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