You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CommandLineParser.h 518B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // Created by robin on 8/8/15.
  3. //
  4. #ifndef PDNS_SLAVE_COMMANDLINEPARSER_H
  5. #define PDNS_SLAVE_COMMANDLINEPARSER_H
  6. # include "../DBO/CommandLineOption.h"
  7. class CommandLineOption;
  8. class CommandLineParser
  9. {
  10. public:
  11. CommandLineParser(int argc, char** argv);
  12. bool parse();
  13. int showHelp(int status = 0, bool stdErr = true);
  14. void addOption(CommandLineOption* opt);
  15. private:
  16. int _argc;
  17. char** _argv;
  18. std::vector<CommandLineOption*> _options;
  19. };
  20. #endif //PDNS_SLAVE_COMMANDLINEPARSER_H