JeVois  1.0
JeVois Smart Embedded Machine Vision Toolkit

#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 std::string const str () const =0
 Convert the specification of valid values to a readable string. More...

Constructor & Destructor Documentation

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.

Definition at line 29 of file ValidValuesSpecImpl.H.

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


Definition at line 33 of file ValidValuesSpecImpl.H.

Member Function Documentation

template<typename T >
virtual bool jevois::ValidValuesSpecBase< T >::checkValueValidity ( T const &  val) const
pure virtual
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::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 files: