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

#include <jevois/Component/ValidValuesSpec.H>

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

Base class for specifying a set of valid values for a type.

Note when defining new derived valid values specs: make sure you define operator<<() and also that the copy constructor works as intended (which means that you may have to define it explicitly if your data members are complicated).

Definition at line 44 of file ValidValuesSpec.H.

Inheritance diagram for jevois::ValidValuesSpecBase< T >:

Public Member Functions

 ValidValuesSpecBase ()
 Construct, for the base class this is a no-op.
 
virtual ~ValidValuesSpecBase ()
 Destructor.
 
virtual bool checkValueValidity (T const &val) const =0
 Check whether a proposed value is valid, return true if it is.
 
virtual std::string const str () const =0
 Convert the specification of valid values to a readable string.
 

Constructor & Destructor Documentation

◆ ValidValuesSpecBase()

template<typename T >
jevois::ValidValuesSpecBase< T >::ValidValuesSpecBase ( )
explicit

Construct, for the base class this is a no-op.

Note that we make the constructor explicit otherwise we get false hits against strings and what not in our operator<< defined on various ValidValueSpec derivatives.

◆ ~ValidValuesSpecBase()

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

Destructor.

Member Function Documentation

◆ checkValueValidity()

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

◆ str()

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

Convert the specification of valid values to a readable string.

Caution, a GUI may wish to parse this string so keep the format tight. Typically, type:[valuesdescription], e.g., see derived classes for None:[], List:[A|B|C], etc.

Implemented in jevois::ValidValuesSpecNone< T >, jevois::ValidValuesSpecList< T >, jevois::ValidValuesSpecRange< T >, jevois::ValidValuesSpecStepRange< T >, and jevois::ValidValuesSpecRegex< T >.


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