Public Member Functions | Protected Attributes | List of all members
ecl::ValuesConstraint< T > Class Template Reference

#include <values_constraint.hpp>

Inheritance diagram for ecl::ValuesConstraint< T >:
Inheritance graph
[legend]

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 ()
 
- Public Member Functions inherited from ecl::Constraint< T >
virtual ~Constraint ()
 

Protected Attributes

std::vector< T > _allowed
 
std::string _typeDesc
 

Detailed Description

template<class T>
class ecl::ValuesConstraint< T >

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

Definition at line 39 of file values_constraint.hpp.

Constructor & Destructor Documentation

◆ ValuesConstraint()

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

Constructor.

Parameters
allowed- vector of allowed values.

Definition at line 87 of file values_constraint.hpp.

◆ ~ValuesConstraint()

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

Virtual destructor.

Definition at line 53 of file values_constraint.hpp.

Member Function Documentation

◆ check()

template<class T >
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.

Parameters
value- The value that will be checked.

Implements ecl::Constraint< T >.

Definition at line 112 of file values_constraint.hpp.

◆ description()

template<class T >
std::string ecl::ValuesConstraint< T >::description
virtual

Returns a description of the Constraint.

Implements ecl::Constraint< T >.

Definition at line 127 of file values_constraint.hpp.

◆ shortID()

template<class T >
std::string ecl::ValuesConstraint< T >::shortID
virtual

Returns the short ID for the Constraint.

Implements ecl::Constraint< T >.

Definition at line 121 of file values_constraint.hpp.

Member Data Documentation

◆ _allowed

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

The list of valid values.

Definition at line 77 of file values_constraint.hpp.

◆ _typeDesc

template<class T >
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.


The documentation for this class was generated from the following file:


ecl_command_line
Author(s): Daniel Stonier
autogenerated on Sun Aug 2 2020 03:12:03