added -h --help option to display help

This commit is contained in:
Erik Frojdh
2019-06-21 17:27:47 +02:00
parent 2d3f5a03ca
commit e80ce1b4c4
5 changed files with 86 additions and 21 deletions

View File

@ -14,6 +14,7 @@ class CmdLineParser {
int detector_id() const { return detector_id_; };
int n_arguments() const { return arguments_.size(); }
const std::string &command() const { return command_; }
bool isHelp() const{return help_;}
void setCommand(std::string cmd){command_ = cmd;}
const std::string &executable() const { return executable_; }
const std::vector<std::string> &arguments() const { return arguments_; };
@ -23,6 +24,7 @@ class CmdLineParser {
void DecodeIdAndPosition(const char *c);
int multi_id_ = 0;
int detector_id_ = -1;
bool help_{false};
std::string command_;
std::string executable_;
std::vector<std::string> arguments_;