31 #ifndef TCLAP_VALUESCONSTRAINT_H 32 #define TCLAP_VALUESCONSTRAINT_H 44 #if defined(HAVE_SSTREAM) 46 #elif defined(HAVE_STRSTREAM) 49 #error "Need a stringstream (sstream or strstream) to compile!" 83 virtual std::string
shortID()
const;
110 for (
unsigned int i = 0; i <
_allowed.size(); i++ )
113 #if defined(HAVE_SSTREAM) 114 std::ostringstream os;
115 #elif defined(HAVE_STRSTREAM) 118 #error "Need a stringstream (sstream or strstream) to compile!" 123 std::string temp( os.str() );
ValuesConstraint(std::vector< T > &allowed)
Constructor.
virtual std::string shortID() const
Returns the short ID for the Constraint.
virtual bool check(const T &value) const
The method used to verify that the value parsed from the command line meets the constraint.
T value(details::expression_node< T > *n)
const_iterator find(const KEY &key) const
virtual ~ValuesConstraint()
Virtual destructor.
std::string _typeDesc
The string used to describe the allowed values of this constraint.
A Constraint that constrains the Arg to only those values specified in the constraint.
virtual std::string description() const
Returns a description of the Constraint.
std::vector< T > _allowed
The list of valid values.
The interface that defines the interaction between the Arg and Constraint.