JeVois  1.22
JeVois Smart Embedded Machine Vision Toolkit
Share this page:
Loading...
Searching...
No Matches

#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.
 
 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.
 
- Public Member Functions inherited from jevois::ValidValuesSpecBase< T >
 ValidValuesSpecBase ()
 Construct, for the base class this is a no-op.
 
virtual ~ValidValuesSpecBase ()
 Destructor.
 

Protected Attributes

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

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