Patrick Williams | 3667cf3 | 2015-10-20 22:39:11 -0500 | [diff] [blame^] | 1 | #ifndef __ARGUMENT_H |
| 2 | #define __ARGUMENT_H |
| 3 | #include <getopt.h> |
| 4 | #include <map> |
| 5 | #include <string> |
| 6 | |
| 7 | class ArgumentParser |
| 8 | { |
| 9 | public: |
| 10 | ArgumentParser(int argc, char** argv); |
| 11 | const std::string& operator[](const std::string& opt); |
| 12 | |
| 13 | static void usage(char** argv); |
| 14 | |
| 15 | static const std::string true_string; |
| 16 | static const std::string empty_string; |
| 17 | |
| 18 | private: |
| 19 | std::map<const std::string, std::string> arguments; |
| 20 | |
| 21 | static const option options[]; |
| 22 | static const char* optionstr; |
| 23 | |
| 24 | private: |
| 25 | ArgumentParser() {}; |
| 26 | }; |
| 27 | |
| 28 | #endif |