#include <MultiSwitchArg.h>
Inheritance diagram for TCLAP::MultiSwitchArg:
Public Member Functions | |
MultiSwitchArg (const std::string &flag, const std::string &name, const std::string &desc, int init=0, Visitor *v=NULL) | |
MultiSwitchArg constructor. | |
MultiSwitchArg (const std::string &flag, const std::string &name, const std::string &desc, CmdLineInterface &parser, int init=0, Visitor *v=NULL) | |
MultiSwitchArg constructor. | |
virtual bool | processArg (int *i, std::vector< std::string > &args) |
Handles the processing of the argument. | |
int | getValue () |
Returns int, the number of times the switch has been set. | |
std::string | shortID (const std::string &val) const |
Returns the shortID for this Arg. | |
std::string | longID (const std::string &val) const |
Returns the longID for this Arg. | |
void | reset () |
Clears the Arg object and allows it to be reused by new command lines. | |
Protected Attributes | |
int | _value |
The value of the switch. | |
int | _default |
Used to support the reset() method so that ValueArg can be reset to their constructed value. |
If the switch is set on the command line, then the getValue method will return the number of times the switch appears.
Definition at line 39 of file MultiSwitchArg.h.
|
MultiSwitchArg constructor.
Definition at line 130 of file MultiSwitchArg.h. |
|
MultiSwitchArg constructor.
Definition at line 140 of file MultiSwitchArg.h. References TCLAP::CmdLineInterface::add(). |
Here is the call graph for this function:
|
Returns int, the number of times the switch has been set.
Reimplemented from TCLAP::SwitchArg. Definition at line 153 of file MultiSwitchArg.h. |
|
Returns the longID for this Arg.
Reimplemented from TCLAP::Arg. Definition at line 199 of file MultiSwitchArg.h. |
|
Handles the processing of the argument. This re-implements the SwitchArg version of this method to set the _value of the argument appropriately.
Reimplemented from TCLAP::SwitchArg. Definition at line 155 of file MultiSwitchArg.h. References TCLAP::Arg::_checkWithVisitor(), TCLAP::Arg::argMatches(), and TCLAP::SwitchArg::combinedSwitchesMatch(). |
Here is the call graph for this function:
|
Clears the Arg object and allows it to be reused by new command lines.
Reimplemented from TCLAP::SwitchArg. Definition at line 205 of file MultiSwitchArg.h. |
|
Returns the shortID for this Arg.
Reimplemented from TCLAP::Arg. Definition at line 193 of file MultiSwitchArg.h. |
|
Used to support the reset() method so that ValueArg can be reset to their constructed value.
Reimplemented from TCLAP::SwitchArg. Definition at line 52 of file MultiSwitchArg.h. |
|
The value of the switch.
Reimplemented from TCLAP::SwitchArg. Definition at line 46 of file MultiSwitchArg.h. |