#include <values_constraint.hpp>
Public Member Functions | |
virtual bool | check (const T &value) const |
virtual std::string | description () const |
virtual std::string | shortID () const |
ValuesConstraint (std::vector< T > &allowed) | |
virtual | ~ValuesConstraint () |
Protected Attributes | |
std::vector< T > | _allowed |
std::string | _typeDesc |
A Constraint that constrains the Arg to only those values specified in the constraint.
Definition at line 39 of file values_constraint.hpp.
ecl::ValuesConstraint< T >::ValuesConstraint | ( | std::vector< T > & | allowed | ) |
Constructor.
allowed | - vector of allowed values. |
Definition at line 87 of file values_constraint.hpp.
virtual ecl::ValuesConstraint< T >::~ValuesConstraint | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 53 of file values_constraint.hpp.
bool ecl::ValuesConstraint< T >::check | ( | const T & | value | ) | const [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 ecl::Constraint< T >.
Definition at line 112 of file values_constraint.hpp.
std::string ecl::ValuesConstraint< T >::description | ( | ) | const [virtual] |
Returns a description of the Constraint.
Implements ecl::Constraint< T >.
Definition at line 127 of file values_constraint.hpp.
std::string ecl::ValuesConstraint< T >::shortID | ( | ) | const [virtual] |
Returns the short ID for the Constraint.
Implements ecl::Constraint< T >.
Definition at line 121 of file values_constraint.hpp.
std::vector<T> ecl::ValuesConstraint< T >::_allowed [protected] |
The list of valid values.
Definition at line 77 of file values_constraint.hpp.
std::string ecl::ValuesConstraint< T >::_typeDesc [protected] |
The string used to describe the allowed values of this constraint.
Definition at line 82 of file values_constraint.hpp.