]> git.mxchange.org Git - flightgear.git/blob - src/FDM/UIUCModel/uiuc_parsefile.h
MSVC compatibility changes and code tweaks for minor nits caught by the
[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 <fstream>
9
10 FG_USING_STD(list);
11 FG_USING_STD(string);
12 FG_USING_STD(ifstream);
13
14 #define DELIMITERS " \t"
15 #define COMMENT "#"
16
17 #define MAXLINE 200   // Max size of the line of the input file
18
19 typedef list<string> stack; //list to contain the input file "command_lines"
20
21 class ParseFile
22 {
23         private:
24                 
25                 stack commands;
26                 ifstream file;
27                 void readFile();
28
29         public:
30
31                 ParseFile() {}
32                 ParseFile(const string fileName);
33                 ~ParseFile();
34
35                 
36                 void removeComments(string& inputLine);
37                 string getToken(string inputLine, int tokenNo);
38                 void storeCommands(string inputLine);
39                 stack getCommands();
40 };
41
42 #endif  // _PARSE_FILE_H_