7#ifndef ARGPARSER_H_INCLUDED
8#define ARGPARSER_H_INCLUDED
21 inline ArgOpts(
const std::string &chr,
bool boolean,
bool optional,
22 const std::string &descr)
40 const std::string
operator [](
const std::string &arg)
const;
42 void addOptional(
const std::string &arg,
const std::string &desc,
44 void addRequired(
const std::string &arg,
const std::string &desc,
46 bool hasArg(
const std::string &arg)
const;
50 void setTail(
const std::string &str);
55 void registerArg(
const std::string &arg,
const std::string &desc,
56 bool boolean,
bool optional);
58 std::string errString;
59 std::map<std::string, ArgOpts> reg;
60 std::map<std::string, std::string> args;
61 std::map<std::string, bool> passedArgs;
62 std::vector<std::string> unqualified;
ArgOpts(const std::string &chr, bool boolean, bool optional, const std::string &descr)
void setTail(const std::string &str)
const std::string operator[](const std::string &arg) const
void addRequired(const std::string &arg, const std::string &desc, bool boolean)
std::string usageString(void) const
bool hasArg(const std::string &arg) const
bool parse(int argc, char *argv[])
std::string errorString(void) const
const std::vector< std::string > & getUnqualifiedArgs() const
void addOptional(const std::string &arg, const std::string &desc, bool boolean)