JeVois
1.22
JeVois Smart Embedded Machine Vision Toolkit
|
|
#include <jevois/Component/Parameter.H>
Base class for Parameter.
This exposes the string interface to the Parameter while derived template classes will expose the value-based interface.
Definition at line 122 of file Parameter.H.
Public Member Functions | |
ParameterBase () | |
Constructor. | |
virtual | ~ParameterBase () |
Destructor, will remove the parameter from its owner component. | |
virtual std::string const & | name () const =0 |
Get the parameter name. | |
virtual std::string | descriptor () const =0 |
Get the parameter fully-qualified name, aka descriptor, including names of owning Component and all parents. | |
virtual void | strset (std::string const &valstring)=0 |
Set the value from a string representation of it. | |
virtual std::string const | strget () const =0 |
Get the value as a string. | |
virtual ParameterSummary const | summary () const =0 |
Get summary info about this parameter. | |
void | freeze (bool doit) |
Freeze or un-freeze a parameter; frozen parameters cannot be set(), but get() is still allowed. | |
bool | frozen () const |
Returns whether parameter is frozen. | |
virtual void | reset ()=0 |
Reset this parameter to its default value. | |
Protected Attributes | |
boost::shared_mutex | itsMutex |
Mutex to protect the parameter value. | |
volatile bool | itsFrozen |
When true, parameter is frozen (read-only, does not show up in help message) | |
bool | itsVirgin |
Param has not yet been explicitly set, need to call the callback (if any) at init time. | |
Friends | |
class | ParameterRegistry |
jevois::ParameterBase::ParameterBase | ( | ) |
Constructor.
|
virtual |
Destructor, will remove the parameter from its owner component.
|
pure virtual |
Get the parameter fully-qualified name, aka descriptor, including names of owning Component and all parents.
Implemented in jevois::ParameterCore< T >.
void jevois::ParameterBase::freeze | ( | bool | doit | ) |
Freeze or un-freeze a parameter; frozen parameters cannot be set(), but get() is still allowed.
Referenced by jevois::Component::freezeParam().
bool jevois::ParameterBase::frozen | ( | ) | const |
Returns whether parameter is frozen.
|
pure virtual |
Get the parameter name.
Implemented in jevois::ParameterCore< T >.
Referenced by jevois::ParameterRegistry::addParameter(), and jevois::ParameterRegistry::removeParameter().
|
pure virtual |
Reset this parameter to its default value.
Implemented in jevois::ParameterCore< T >.
|
pure virtual |
Get the value as a string.
Implemented in jevois::ParameterCore< T >.
Referenced by jevois::Component::getParamString().
|
pure virtual |
Set the value from a string representation of it.
std::range_error | if the given string cannot be converted to a Parameter value, or the value is invalid according to our valid values spec or rejected by the Parameter's callback (if any). |
Implemented in jevois::ParameterCore< T >.
Referenced by jevois::Component::setParamString().
|
pure virtual |
Get summary info about this parameter.
Implemented in jevois::ParameterCore< T >.
Referenced by jevois::GUIhelper::drawParameters().
|
friend |
Definition at line 163 of file Parameter.H.
|
protected |
When true, parameter is frozen (read-only, does not show up in help message)
Definition at line 159 of file Parameter.H.
|
mutableprotected |
Mutex to protect the parameter value.
Definition at line 158 of file Parameter.H.
|
protected |
Param has not yet been explicitly set, need to call the callback (if any) at init time.
Definition at line 160 of file Parameter.H.