JeVois  1.5
JeVois Smart Embedded Machine Vision Toolkit
Share this page:

#include <jevois/Component/ValidValuesSpec.H>

template<typename T>
class jevois::ValidValuesSpecList< T >

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

Definition at line 87 of file ValidValuesSpec.H.

Inheritance diagram for jevois::ValidValuesSpecList< T >:
Collaboration diagram for jevois::ValidValuesSpecList< T >:

Public Member Functions

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

Protected Attributes

std::vector< T > const itsValidList
 Our list of valid values. More...
 

Constructor & Destructor Documentation

◆ ValidValuesSpecList() [1/2]

template<typename T >
jevois::ValidValuesSpecList< T >::ValidValuesSpecList ( )
delete

No default constructor, always need to provide a list.

◆ ValidValuesSpecList() [2/2]

template<typename T >
jevois::ValidValuesSpecList< T >::ValidValuesSpecList ( std::vector< T > const &  valid_list)
inlineexplicit

Construct from a given list of valid values in a vector.

Definition at line 59 of file ValidValuesSpecImpl.H.

◆ ~ValidValuesSpecList()

template<typename T >
jevois::ValidValuesSpecList< T >::~ValidValuesSpecList ( )
inlinevirtual

Destructor.

Definition at line 64 of file ValidValuesSpecImpl.H.

Member Function Documentation

◆ checkValueValidity()

template<typename T >
bool jevois::ValidValuesSpecList< T >::checkValueValidity ( T const &  val) const
inlinevirtual

Check whether a proposed value is valid, returns true iff value is in our list.

Implements jevois::ValidValuesSpecBase< T >.

Definition at line 68 of file ValidValuesSpecImpl.H.

References jevois::ValidValuesSpecList< T >::itsValidList.

◆ str()

template<typename T >
std::string const jevois::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 jevois::ValidValuesSpecBase< T >.

Definition at line 75 of file ValidValuesSpecImpl.H.

References jevois::ValidValuesSpecList< T >::itsValidList.

Member Data Documentation

◆ itsValidList

template<typename T >
std::vector<T> const jevois::ValidValuesSpecList< T >::itsValidList
protected

Our list of valid values.

Definition at line 107 of file ValidValuesSpec.H.

Referenced by jevois::ValidValuesSpecList< T >::checkValueValidity(), and jevois::ValidValuesSpecList< T >::str().


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