15 #ifndef TCLAP_SWITCH_ARG_H 16 #define TCLAP_SWITCH_ARG_H 31 class SwitchArg :
public Arg
55 const std::string& name,
56 const std::string& desc,
75 const std::string& name,
76 const std::string& desc,
77 CmdLineInterface& parser,
90 virtual bool processArg(
int* i, std::vector<std::string>& args);
109 const std::string& name,
110 const std::string& desc,
113 :
Arg(flag, name, desc, false, false, v),
118 const std::string& name,
119 const std::string& desc,
120 CmdLineInterface& parser,
123 : Arg(flag, name, desc, false, false, v),
144 for (
unsigned int i = 1; i < combinedSwitches.length(); i++ )
145 if ( combinedSwitches[i] ==
_flag[0] )
175 throw(CmdLineParseException(
"Argument already set!",
toString()));
SwitchArg(const std::string &flag, const std::string &name, const std::string &desc, bool def=false, Visitor *v=NULL)
static std::string nameStartString()
static std::string flagStartString()
virtual bool processArg(int *i, std::vector< std::string > &args)
bool combinedSwitchesMatch(std::string &combined)
virtual std::string toString() const
void _checkWithVisitor() const
virtual bool argMatches(const std::string &s) const
Arg(const std::string &flag, const std::string &name, const std::string &desc, bool req, bool valreq, Visitor *v=NULL)