JeVois  1.20
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 const std::string 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

const std::vector< T > 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)
explicit

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

◆ ~ValidValuesSpecList()

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

Destructor.

Member Function Documentation

◆ checkValueValidity()

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

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

Implements jevois::ValidValuesSpecBase< T >.

◆ str()

template<typename T >
virtual const std::string jevois::ValidValuesSpecList< T >::str ( ) const
virtual

Convert to a readable string.

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

Implements jevois::ValidValuesSpecBase< T >.

Member Data Documentation

◆ itsValidList

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

Our list of valid values.

Definition at line 107 of file ValidValuesSpec.H.


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