24 #ifndef TCLAP_VALUES_CONSTRAINT_H 25 #define TCLAP_VALUES_CONSTRAINT_H 61 virtual std::string
shortID()
const;
68 virtual bool check(
const T &value)
const;
85 for (
unsigned int i = 0; i <
_allowed.size(); i++) {
89 std::string temp(os.str());
115 #endif // TCLAP_VALUES_CONSTRAINT_H A Constraint that constrains the Arg to only those values specified in the constraint.
ValuesConstraint(std::vector< T > &allowed)
Constructor.
virtual std::string shortID() const
Returns the short ID for the Constraint.
virtual std::string description() const
Returns a description of the Constraint.
The interface that defines the interaction between the Arg and Constraint.
std::vector< T > _allowed
The list of valid values.
std::ostringstream ostringstream
std::string _typeDesc
The string used to describe the allowed values of this constraint.
virtual ~ValuesConstraint()
Virtual destructor.
virtual bool check(const T &value) const
The method used to verify that the value parsed from the command line meets the constraint.