23#ifndef TCLAP_VALUESCONSTRAINT_H
24#define TCLAP_VALUESCONSTRAINT_H
66 virtual std::string
shortID()
const;
73 virtual bool check(
const T& value)
const;
94 for (
unsigned int i = 0; i <
_allowed.size(); i++ )
97#if defined(HAVE_SSTREAM)
98 std::ostringstream os;
99#elif defined(HAVE_STRSTREAM)
102#error "Need a stringstream (sstream or strstream) to compile!"
107 std::string temp( os.str() );
The interface that defines the interaction between the Arg and Constraint.
std::string _typeDesc
The string used to describe the allowed values of this constraint.
virtual bool check(const T &value) const
The method used to verify that the value parsed from the command line meets the constraint.
virtual std::string description() const
Returns a description of the Constraint.
ValuesConstraint(std::vector< T > &allowed)
Constructor.
virtual ~ValuesConstraint()
Virtual destructor.
std::vector< T > _allowed
The list of valid values.
virtual std::string shortID() const
Returns the short ID for the Constraint.