15 #ifndef TCLAP_MULTI_SWITCH_ARG_H 16 #define TCLAP_MULTI_SWITCH_ARG_H 29 class MultiSwitchArg :
public SwitchArg
55 const std::string& name,
56 const std::string& desc,
76 const std::string& name,
77 const std::string& desc,
78 CmdLineInterface& parser,
91 virtual bool processArg(
int* i, std::vector<std::string>& args);
101 std::string
shortID(
const std::string& val)
const;
106 std::string
longID(
const std::string& val)
const;
113 const std::string& name,
114 const std::string& desc,
122 const std::string& name,
123 const std::string& desc,
124 CmdLineInterface& parser,
127 : SwitchArg(flag, name, desc, false, v),
140 if ( argMatches( args[*i] ))
152 else if ( combinedSwitchesMatch( args[*i] ) )
161 while ( combinedSwitchesMatch( args[*i] ) )
181 std::string
id =
Arg::longID() +
" (accepted multiple times) " + val;
SwitchArg(const std::string &flag, const std::string &name, const std::string &desc, bool def=false, Visitor *v=NULL)
virtual std::string shortID(const std::string &valueId="val") const
std::string shortID(const std::string &val) const
MultiSwitchArg(const std::string &flag, const std::string &name, const std::string &desc, int init=0, Visitor *v=NULL)
virtual bool processArg(int *i, std::vector< std::string > &args)
virtual std::string longID(const std::string &valueId="val") const
std::string longID(const std::string &val) const