Main MRPT website > C++ reference for MRPT 1.4.0
List of all members | Public Member Functions | Protected Attributes
TCLAP::ValuesConstraint< T > Class Template Reference

Detailed Description

template<class T>
class TCLAP::ValuesConstraint< T >

A Constraint that constrains the Arg to only those values specified in the constraint.

Definition at line 59 of file ValuesConstraint.h.

#include <mrpt/otherlibs/tclap/ValuesConstraint.h>

Inheritance diagram for TCLAP::ValuesConstraint< T >:
Inheritance graph

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...
 

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...
 

Constructor & Destructor Documentation

template<class T >
TCLAP::ValuesConstraint< T >::ValuesConstraint ( std::vector< T > &  allowed)

Constructor.

Parameters
allowed- vector of allowed values.

Definition at line 107 of file ValuesConstraint.h.

References TCLAP::ValuesConstraint< T >::_allowed, and TCLAP::ValuesConstraint< T >::_typeDesc.

template<class T >
virtual TCLAP::ValuesConstraint< T >::~ValuesConstraint ( )
inlinevirtual

Member Function Documentation

template<class T >
bool TCLAP::ValuesConstraint< T >::check ( const T &  value) const
virtual

The method used to verify that the value parsed from the command line meets the constraint.

Parameters
value- The value that will be checked.

Implements TCLAP::Constraint< T >.

Definition at line 132 of file ValuesConstraint.h.

References TCLAP::ValuesConstraint< T >::_allowed.

Referenced by TCLAP::ValuesConstraint< T >::~ValuesConstraint().

template<class T >
std::string TCLAP::ValuesConstraint< T >::description ( ) const
virtual

Returns a description of the Constraint.

Implements TCLAP::Constraint< T >.

Definition at line 147 of file ValuesConstraint.h.

References TCLAP::ValuesConstraint< T >::_typeDesc.

Referenced by TCLAP::ValuesConstraint< T >::~ValuesConstraint().

template<class T >
std::string TCLAP::ValuesConstraint< T >::shortID ( ) const
virtual

Returns the short ID for the Constraint.

Implements TCLAP::Constraint< T >.

Definition at line 141 of file ValuesConstraint.h.

References TCLAP::ValuesConstraint< T >::_typeDesc.

Referenced by TCLAP::ValuesConstraint< T >::~ValuesConstraint().

Member Data Documentation

template<class T >
std::vector<T> TCLAP::ValuesConstraint< T >::_allowed
protected

The list of valid values.

Definition at line 97 of file ValuesConstraint.h.

Referenced by TCLAP::ValuesConstraint< T >::check(), and TCLAP::ValuesConstraint< T >::ValuesConstraint().

template<class T >
std::string TCLAP::ValuesConstraint< T >::_typeDesc
protected

The string used to describe the allowed values of this constraint.

Definition at line 102 of file ValuesConstraint.h.

Referenced by TCLAP::ValuesConstraint< T >::description(), TCLAP::ValuesConstraint< T >::shortID(), and TCLAP::ValuesConstraint< T >::ValuesConstraint().




Page generated by Doxygen 1.8.11 for MRPT 1.4.0 SVN:Unversioned directory at Sun Jul 10 11:38:36 UTC 2016