42 std::vector <std::string> tokens;
43 std::string empty_string;
45 ArgParser (
int &argc,
char **argv){
46 for (
int i=1; i < argc; ++i)
47 this->tokens.push_back(std::string(argv[i]));
50 const std::string& getCmdOption(
const std::string &option)
const{
51 std::vector<std::string>::const_iterator itr;
52 itr = std::find(this->tokens.begin(), this->tokens.end(), option);
53 if (itr != this->tokens.end() && ++itr != this->tokens.end()){
59 bool cmdOptionExists(
const std::string &option)
const{
60 return std::find(this->tokens.begin(), this->tokens.end(), option)
61 != this->tokens.end();
65 #endif // argparse_hpp Definition: argparse.hpp:39