]> git.localhorst.tv Git - l2e.git/blob - src/app/Arguments.h
ace8cda2e77e9764fcba61816c6d215758e606d6
[l2e.git] / src / app / Arguments.h
1 /*
2  * Arguments.h
3  *
4  *  Created on: Sep 15, 2012
5  *      Author: holy
6  */
7
8 #ifndef APP_ARGUMENTS_H_
9 #define APP_ARGUMENTS_H_
10
11 #include <vector>
12
13 namespace app {
14
15 /// Specialized argument interpreter.
16 /// Reads command line arguments via Read(int, char**) function.
17 class Arguments {
18
19 public:
20         Arguments();
21         ~Arguments() { }
22
23 public:
24         enum RunLevel {
25                 DUMP,
26                 PLAY,
27                 WRITE,
28
29                 // temporary modes
30                 BATTLE,
31                 MAP,
32                 SOURCE_WIKI,
33         };
34
35 public:
36         void Read(int argc, char **argv);
37
38         RunLevel GetRunLevel() const { return runlevel; }
39
40         const std::vector<char *> &Infiles() const { return infiles; }
41
42         bool OutfileSet() const { return outfile; }
43         const char *OutfilePath() const { return outfile; }
44
45 private:
46         std::vector<char *> infiles;
47         const char *outfile;
48         RunLevel runlevel;
49
50 };
51
52 }
53
54 #endif /* APP_ARGUMENTS_H_ */