]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_parsefile.h
Updated to match changes in radiostack.[ch]xx
[flightgear.git] / src / FDM / UIUCModel / uiuc_parsefile.h
1 #ifndef _PARSE_FILE_H_
2 #define _PARSE_FILE_H_
3
4 #include <simgear/compiler.h>
5
6 #include <string>
7 #include <list>
8 #include STL_FSTREAM
9
10 SG_USING_STD(list);
11 SG_USING_STD(string);
12 SG_USING_STD(getline);
13 #if !defined (SG_HAVE_NATIVE_SGI_COMPILERS)
14 SG_USING_STD(ifstream);
15 #endif
16
17 #define DELIMITERS " \t"
18 #define COMMENT "#"
19
20 #define MAXLINE 200   // Max size of the line of the input file
21
22 typedef list<string> stack; //list to contain the input file "command_lines"
23
24 class ParseFile
25 {
26         private:
27                 
28                 stack commands;
29                 ifstream file;
30                 void readFile();
31
32         public:
33
34                 ParseFile() {}
35                 ParseFile(const string fileName);
36                 ~ParseFile();
37
38                 
39                 void removeComments(string& inputLine);
40                 string getToken(string inputLine, int tokenNo);
41                 void storeCommands(string inputLine);
42                 stack getCommands();
43 };
44
45 #endif  // _PARSE_FILE_H_