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

#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. More...
virtual ~ValidValuesSpecBase ()
 Destructor. More...
virtual bool checkValueValidity (T const &val) const =0
 Check whether a proposed value is valid, return true if it is. More...
virtual const std::string str () const =0
 Convert the specification of valid values to a readable string. More...

Constructor & Destructor Documentation

◆ ValidValuesSpecBase()

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

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 ( )


Member Function Documentation

◆ checkValueValidity()

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

◆ str()

template<typename T >
virtual const std::string 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::ValidValuesSpecRegex< T >, jevois::ValidValuesSpecStepRange< T >, jevois::ValidValuesSpecRange< T >, jevois::ValidValuesSpecList< T >, and jevois::ValidValuesSpecNone< T >.

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