Go to the documentation of this file.
33 #ifndef TCLAP_MULTI_SWITCH_ARG_H
34 #define TCLAP_MULTI_SWITCH_ARG_H
47 template <
class DUMMY =
int>
48 class MultiSwitchArg :
public SwitchArg
74 const std::string& name,
75 const std::string& desc,
95 const std::string& name,
96 const std::string& desc,
110 virtual bool processArg(
int* i, std::vector<std::string>& args);
120 std::string
shortID(
const std::string& val)
const;
125 std::string
longID(
const std::string& val)
const;
131 template <
class DUMMY>
133 const std::string& name,
134 const std::string& desc,
141 template <
class DUMMY>
143 const std::string& name,
144 const std::string& desc,
145 CmdLineInterface& parser,
148 : SwitchArg(flag, name, desc, false, v),
154 template <
class DUMMY>
157 template <
class DUMMY>
163 if ( argMatches( args[*i] ))
175 else if ( combinedSwitchesMatch( args[*i] ) )
184 while ( combinedSwitchesMatch( args[*i] ) )
195 template <
class DUMMY>
203 template <
class DUMMY>
206 std::string
id =
Arg::longID() +
" (accepted multiple times)";
static bool ignoreRest()
Whether to ignore the rest.
virtual std::string shortID(const std::string &valueId="val") const
Returns a short ID for the usage.
int _value
The value of the switch.
A simple switch argument.
int getValue()
Returns int, the number of times the switch has been set.
The base class that manages the command line definition and passes along the parsing to the appropria...
virtual std::string longID(const std::string &valueId="val") const
Returns a long ID for the usage.
A base class that defines the interface for visitors.
MultiSwitchArg(const std::string &flag, const std::string &name, const std::string &desc, int init=0, Visitor *v=NULL)
MultiSwitchArg constructor.
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
std::string longID(const std::string &val) const
Returns the longID for this Arg.
std::string shortID(const std::string &val) const
Returns the shortID for this Arg.
Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Sat Jan 18 22:37:07 UTC 2020 | | |