iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::ValidValuesSpecList< T > Class Template Reference

#include <nrt/Core/Typing/ValidValuesSpec.H>

template<class T>
class nrt::ValidValuesSpecList< T >

Finite list valid values spec, everything listed at construction is valid, anything else is not.

Definition at line 104 of file ValidValuesSpec.H.

Inheritance diagram for nrt::ValidValuesSpecList< T >:
nrt::ValidValuesSpecBase< T >

Public Member Functions

 ValidValuesSpecList ()=delete
 No default constructor, always need to provide a list.
 
 ValidValuesSpecList (std::vector< T > const &valid_list)
 Construct from a given list of valid values in a vector.
 
virtual ~ValidValuesSpecList ()
 Destructor.
 
virtual bool checkValueValidity (T const &val) const
 Check whether a proposed value is valid, returns true iff value is in our list.
 
virtual std::string const str () const
 Convert to a readable string. More...
 
- Public Member Functions inherited from nrt::ValidValuesSpecBase< T >
 ValidValuesSpecBase ()
 Construct, for the base class this is a no-op. More...
 
virtual ~ValidValuesSpecBase ()
 Destructor.
 

Protected Attributes

std::vector< T > const itsValidList
 

Member Function Documentation

template<class T >
std::string const nrt::ValidValuesSpecList< T >::str ( ) const
inlinevirtual

Convert to a readable string.

Returns List:[A|B|C] where A, B, C are replaced by the actual elements.

Implements nrt::ValidValuesSpecBase< T >.

Definition at line 92 of file ValidValuesSpecImpl.H.


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