JeVois
1.22
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/Component/ValidValuesSpec.H>
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.
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. | |
|
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.
|
virtual |
Destructor.
|
pure virtual |
Check whether a proposed value is valid, return true if it is.
Implemented in jevois::ValidValuesSpecNone< T >, jevois::ValidValuesSpecList< T >, jevois::ValidValuesSpecRange< T >, jevois::ValidValuesSpecStepRange< T >, and jevois::ValidValuesSpecRegex< T >.
|
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 >.