Esempio n. 1
0
 public void LoadTestData(String path)
 {
     Lexer lexer = new Lexer(path);
     lexer.Lexify();
     LinkedList<Token> tokens = lexer.Tokens;
     LinkedListNode<Token> tokenNode = tokens.First;
     while (tokenNode != null)
     {
         switch (tokenNode.Value.Tag)
         {
             case Tag.CELLS_START: FillCells(ref tokenNode);
                 break;
         }
         tokenNode = tokenNode.Next;
     }
 }
Esempio n. 2
0
 private LinkedList<Token> GetTokens()
 {
     Lexer lexer = new Lexer(ProblemPath);
     lexer.Lexify();
     return lexer.Tokens;
 }
Esempio n. 3
0
 /// <summary>
 /// Load the frequencies in the assignment file into the current loaded problem file model.
 /// </summary>
 /// <param name="path"></param>
 /// <exception cref="InvalidFAPFileException">Exception gets thrown when the the given assignment file, format isn't of an Assignment type</exception>
 /// <exception cref="InvalidScenarioIDException">Exception gets thrown when the given assignment file has a scenario id that doesn't match the current loaded problem file scenario id</exception>
 public void LoadTestData(String path)
 {
     if (this.Cells == null || InterferenceMatrix.Count == 0)
         throw new System.InvalidOperationException("No problem file has been loaded, therefore the model is not initialized");
     Lexer lexer = new Lexer(path);
     lexer.Lexify();
     LinkedList<Token> tokens = lexer.Tokens;
     FAPTestLoader testLoader = new FAPTestLoader(tokens.First,this.GeneralInformation.ScenarioID);
     testLoader.LoadDataIntoCells(Cells);
 }