Go to the documentation of this file.
32 #ifndef TCLAP_SWITCH_ARG_H
33 #define TCLAP_SWITCH_ARG_H
71 const std::string& name,
72 const std::string& desc,
91 const std::string& name,
92 const std::string& desc,
106 virtual bool processArg(
int* i, std::vector<std::string>& args);
125 const std::string& name,
126 const std::string& desc,
129 :
Arg(flag, name, desc, false, false, v),
134 const std::string& name,
135 const std::string& desc,
139 :
Arg(flag, name, desc, false, false, v),
160 for (
unsigned int i = 1; i < combinedSwitches.length(); i++ )
161 if ( combinedSwitches[i] ==
_flag[0] )
virtual bool argMatches(const std::string &s) const
A method that tests whether a string matches this argument.
static const std::string flagStartString()
The sting that indicates the beginning of a flag.
static bool ignoreRest()
Whether to ignore the rest.
virtual bool processArg(int *i, std::vector< std::string > &args)
Handles the processing of the argument.
static char blankChar()
The char used as a place holder when SwitchArgs are combined.
A simple switch argument.
The base class that manages the command line definition and passes along the parsing to the appropria...
Thrown from CmdLine when the arguments on the command line are not properly specified,...
A base class that defines the interface for visitors.
bool _ignoreable
Whether this argument can be ignored, if desired.
std::string _flag
The single char flag used to identify the argument.
virtual void add(Arg &a)=0
Adds an argument to the list of arguments to be parsed.
void _checkWithVisitor() const
Performs the special handling described by the Vistitor.
A virtual base class that defines the essential data for all arguments.
static const std::string nameStartString()
The sting that indicates the beginning of a name.
bool getValue()
Returns bool, whether or not the switch has been set.
virtual std::string toString() const
Returns a simple string representation of the argument.
bool _alreadySet
Indicates whether the argument has been set.
bool combinedSwitchesMatch(std::string &combined)
Checks a string to see if any of the chars in the string match the flag for this Switch.
bool _value
The value of the switch.
SwitchArg(const std::string &flag, const std::string &name, const std::string &desc, bool def=false, Visitor *v=NULL)
SwitchArg constructor.
Page generated by Doxygen 1.8.20 for MRPT 1.4.0 SVN: at Thu Aug 27 02:40:23 UTC 2020 | | |