tclap
1.4.0
|
A Constraint that constrains the Arg to only those values specified in the constraint. More...
#include <ValuesConstraint.h>
Public Member Functions | |
ValuesConstraint (std::vector< T > &allowed) | |
Constructor. More... | |
virtual | ~ValuesConstraint () |
Virtual destructor. More... | |
virtual std::string | description () const |
Returns a description of the Constraint. More... | |
virtual std::string | shortID () const |
Returns the short ID for the Constraint. More... | |
virtual bool | check (const T &value) const |
The method used to verify that the value parsed from the command line meets the constraint. More... | |
Public Member Functions inherited from TCLAP::Constraint< T > | |
virtual | ~Constraint () |
Destructor. More... | |
Protected Attributes | |
std::vector< T > | _allowed |
The list of valid values. More... | |
std::string | _typeDesc |
The string used to describe the allowed values of this constraint. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from TCLAP::Constraint< T > | |
static std::string | shortID (Constraint< T > *constraint) |
A Constraint that constrains the Arg to only those values specified in the constraint.
Definition at line 40 of file ValuesConstraint.h.
|
explicit |
Constructor.
allowed | - vector of allowed values. |
Definition at line 83 of file ValuesConstraint.h.
References TCLAP::ValuesConstraint< T >::_allowed, and TCLAP::ValuesConstraint< T >::_typeDesc.
|
inlinevirtual |
Virtual destructor.
Definition at line 51 of file ValuesConstraint.h.
References TCLAP::ValuesConstraint< T >::check(), TCLAP::ValuesConstraint< T >::description(), and TCLAP::ValuesConstraint< T >::shortID().
|
virtual |
The method used to verify that the value parsed from the command line meets the constraint.
value | - The value that will be checked. |
Implements TCLAP::Constraint< T >.
Definition at line 97 of file ValuesConstraint.h.
References TCLAP::ValuesConstraint< T >::_allowed.
Referenced by TCLAP::ValuesConstraint< T >::~ValuesConstraint().
|
virtual |
Returns a description of the Constraint.
Implements TCLAP::Constraint< T >.
Definition at line 110 of file ValuesConstraint.h.
References TCLAP::ValuesConstraint< T >::_typeDesc.
Referenced by TCLAP::ValuesConstraint< T >::~ValuesConstraint().
|
virtual |
Returns the short ID for the Constraint.
Implements TCLAP::Constraint< T >.
Definition at line 105 of file ValuesConstraint.h.
References TCLAP::ValuesConstraint< T >::_typeDesc.
Referenced by TCLAP::ValuesConstraint< T >::~ValuesConstraint().
|
protected |
The list of valid values.
Definition at line 74 of file ValuesConstraint.h.
Referenced by TCLAP::ValuesConstraint< T >::check(), and TCLAP::ValuesConstraint< T >::ValuesConstraint().
|
protected |
The string used to describe the allowed values of this constraint.
Definition at line 79 of file ValuesConstraint.h.
Referenced by TCLAP::ValuesConstraint< T >::description(), TCLAP::ValuesConstraint< T >::shortID(), and TCLAP::ValuesConstraint< T >::ValuesConstraint().