#include <MultiArg.h>
Inheritance diagram for TCLAP::MultiArg< T >:
Public Types | |
typedef std::vector< T > | container_type |
typedef container_type::iterator | iterator |
typedef container_type::const_iterator | const_iterator |
Public Member Functions | |
MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, Visitor *v=NULL) | |
Constructor. | |
MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, const std::string &typeDesc, CmdLineInterface &parser, Visitor *v=NULL) | |
Constructor. | |
MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, Constraint< T > *constraint, Visitor *v=NULL) | |
MultiArg (const std::string &flag, const std::string &name, const std::string &desc, bool req, Constraint< T > *constraint, CmdLineInterface &parser, Visitor *v=NULL) | |
Constructor. | |
virtual bool | processArg (int *i, std::vector< std::string > &args) |
Handles the processing of the argument. | |
const std::vector< T > & | getValue () |
Returns a vector of type T containing the values parsed from the command line. | |
const_iterator | begin () const |
Returns an iterator over the values parsed from the command line. | |
const_iterator | end () const |
Returns the end of the values parsed from the command line. | |
virtual std::string | shortID (const std::string &val="val") const |
virtual std::string | longID (const std::string &val="val") const |
virtual bool | isRequired () const |
Once we've matched the first value, then the arg is no longer required. | |
virtual bool | allowMore () |
Used for MultiArgs and XorHandler to determine whether args can still be set. | |
virtual void | reset () |
Clears the Arg object and allows it to be reused by new command lines. | |
Protected Member Functions | |
void | _extractValue (const std::string &val) |
Extracts the value from the string. | |
Protected Attributes | |
std::vector< T > | _values |
The list of values parsed from the CmdLine. | |
std::string | _typeDesc |
The description of type T to be used in the usage. | |
Constraint< T > * | _constraint |
A list of constraint on this Arg. | |
bool | _allowMore |
Used by XorHandler to decide whether to keep parsing for this arg. |
Very similar to a ValueArg, except a vector of values will be returned instead of just one.
Definition at line 39 of file MultiArg.h.
|
Definition at line 44 of file MultiArg.h. |
|
Definition at line 42 of file MultiArg.h. |
|
Definition at line 43 of file MultiArg.h. |
|
Constructor.
Definition at line 227 of file MultiArg.h. |
|
Constructor.
Definition at line 242 of file MultiArg.h. References TCLAP::CmdLineInterface::add(). |
Here is the call graph for this function:
|
Definition at line 262 of file MultiArg.h. |
|
Constructor.
Definition at line 277 of file MultiArg.h. References TCLAP::CmdLineInterface::add(). |
Here is the call graph for this function:
|
Extracts the value from the string. Attempts to parse string as type T, if this fails an exception is thrown.
Definition at line 387 of file MultiArg.h. References TCLAP::MultiArg< T >::_constraint, TCLAP::MultiArg< T >::_values, TCLAP::ExtractValue(), and TCLAP::Arg::toString(). Referenced by TCLAP::UnlabeledMultiArg< T >::processArg(), and TCLAP::MultiArg< T >::processArg(). |
Here is the call graph for this function:
|
Used for MultiArgs and XorHandler to determine whether args can still be set.
Reimplemented from TCLAP::Arg. Definition at line 406 of file MultiArg.h. References TCLAP::MultiArg< T >::_allowMore. |
|
Returns an iterator over the values parsed from the command line.
Definition at line 194 of file MultiArg.h. |
|
Returns the end of the values parsed from the command line.
Definition at line 200 of file MultiArg.h. |
|
Returns a vector of type T containing the values parsed from the command line.
Definition at line 294 of file MultiArg.h. |
|
Once we've matched the first value, then the arg is no longer required.
Reimplemented from TCLAP::Arg. Definition at line 372 of file MultiArg.h. References TCLAP::MultiArg< T >::_values. |
|
Used in the usage.
Reimplemented from TCLAP::Arg. Reimplemented in TCLAP::UnlabeledMultiArg< T >. Definition at line 361 of file MultiArg.h. References TCLAP::MultiArg< T >::_typeDesc. |
|
Handles the processing of the argument. This re-implements the Arg version of this method to set the _value of the argument appropriately. It knows the difference between labeled and unlabeled.
Implements TCLAP::Arg. Reimplemented in TCLAP::UnlabeledMultiArg< T >. Definition at line 297 of file MultiArg.h. References TCLAP::Arg::_checkWithVisitor(), TCLAP::MultiArg< T >::_extractValue(), TCLAP::Arg::_hasBlanks(), TCLAP::Arg::argMatches(), TCLAP::Arg::toString(), and TCLAP::Arg::trimFlag(). |
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::Arg. Definition at line 414 of file MultiArg.h. References TCLAP::MultiArg< T >::_values. |
|
Used in the usage.
Reimplemented from TCLAP::Arg. Reimplemented in TCLAP::UnlabeledMultiArg< T >. Definition at line 351 of file MultiArg.h. References TCLAP::MultiArg< T >::_typeDesc. |
|
Used by XorHandler to decide whether to keep parsing for this arg.
Definition at line 74 of file MultiArg.h. Referenced by TCLAP::MultiArg< T >::allowMore(). |
|
A list of constraint on this Arg.
Definition at line 61 of file MultiArg.h. Referenced by TCLAP::MultiArg< T >::_extractValue(). |
|
The description of type T to be used in the usage.
Definition at line 56 of file MultiArg.h. Referenced by TCLAP::MultiArg< T >::longID(), and TCLAP::MultiArg< T >::shortID(). |
|
The list of values parsed from the CmdLine.
Definition at line 51 of file MultiArg.h. Referenced by TCLAP::MultiArg< T >::_extractValue(), TCLAP::MultiArg< T >::isRequired(), and TCLAP::MultiArg< T >::reset(). |