]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_parsefile.h
UIUC flight model contribution. This is based on LaRCsim, but can read
[flightgear.git] / src / FDM / UIUCModel / uiuc_parsefile.h
1 #ifndef _PARSE_FILE_H_
2 #define _PARSE_FILE_H_
3
4 #include <string>
5 #include <list>
6 #include <fstream>
7
8 #define DELIMITERS " \t"
9 #define COMMENT "#"
10
11 #define MAXLINE 200   // Max size of the line of the input file
12
13 typedef list<string> stack; //list to contain the input file "command_lines"
14
15 class ParseFile
16 {
17         private:
18                 
19                 stack commands;
20                 ifstream file;
21                 void readFile();
22
23         public:
24
25                 ParseFile() {}
26                 ParseFile(const string fileName);
27                 ~ParseFile();
28
29                 
30                 void removeComments(string& inputLine);
31                 string getToken(string inputLine, int tokenNo);
32                 void storeCommands(string inputLine);
33                 stack getCommands();
34 };
35
36 #endif  // _PARSE_FILE_H_