cfgfile 0.2.11
Loading...
Searching...
No Matches
cfgfile::constraint_one_of_t< T > Class Template Referencefinal

Constraint that allowed values to be in the given list of values. More...

#include <constraint_one_of.hpp>

+ Inheritance diagram for cfgfile::constraint_one_of_t< T >:
+ Collaboration diagram for cfgfile::constraint_one_of_t< T >:

Public Member Functions

 constraint_one_of_t ()
 Construct constraint.
 
 ~constraint_one_of_t ()
 
void add_value (const T &value)
 Add value to the list of values of the constraint.
 
void remove_value (const T &value)
 Add value to the list of values of the constraint.
 
bool check (const T &value) const override
 Check value for correctness.
 
- Public Member Functions inherited from cfgfile::constraint_t< T >
 constraint_t ()
 Construct constraint.
 
virtual ~constraint_t ()
 

Detailed Description

template<class T>
class cfgfile::constraint_one_of_t< T >

Constraint that allowed values to be in the given list of values.

Constructor & Destructor Documentation

◆ constraint_one_of_t()

template<class T >
cfgfile::constraint_one_of_t< T >::constraint_one_of_t ( )
inline

Construct constraint.

◆ ~constraint_one_of_t()

Member Function Documentation

◆ add_value()

template<class T >
void cfgfile::constraint_one_of_t< T >::add_value ( const T value)
inline

Add value to the list of values of the constraint.

◆ check()

template<class T >
bool cfgfile::constraint_one_of_t< T >::check ( const T value) const
inlineoverridevirtual

Check value for correctness.

Returns
Was check successful?
Return values
trueIf all is OK.
falseIf value doen't correspond to the constraint.

Implements cfgfile::constraint_t< T >.

◆ remove_value()

template<class T >
void cfgfile::constraint_one_of_t< T >::remove_value ( const T value)
inline

Add value to the list of values of the constraint.


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