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

#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.

Inheritance diagram for jevois::ParameterBase:

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
 

Constructor & Destructor Documentation

◆ ParameterBase()

jevois::ParameterBase::ParameterBase ( )

Constructor.

◆ ~ParameterBase()

virtual jevois::ParameterBase::~ParameterBase ( )
virtual

Destructor, will remove the parameter from its owner component.

Member Function Documentation

◆ descriptor()

virtual std::string jevois::ParameterBase::descriptor ( ) const
pure virtual

Get the parameter fully-qualified name, aka descriptor, including names of owning Component and all parents.

Implemented in jevois::ParameterCore< T >.

◆ freeze()

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

◆ frozen()

bool jevois::ParameterBase::frozen ( ) const

Returns whether parameter is frozen.

◆ name()

virtual std::string const & jevois::ParameterBase::name ( ) const
pure virtual

◆ reset()

virtual void jevois::ParameterBase::reset ( )
pure virtual

Reset this parameter to its default value.

Implemented in jevois::ParameterCore< T >.

◆ strget()

virtual std::string const jevois::ParameterBase::strget ( ) const
pure virtual

Get the value as a string.

Implemented in jevois::ParameterCore< T >.

Referenced by jevois::Component::getParamString().

◆ strset()

virtual void jevois::ParameterBase::strset ( std::string const &  valstring)
pure virtual

Set the value from a string representation of it.

Exceptions
std::range_errorif 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().

◆ summary()

virtual ParameterSummary const jevois::ParameterBase::summary ( ) const
pure virtual

Get summary info about this parameter.

Implemented in jevois::ParameterCore< T >.

Referenced by jevois::GUIhelper::drawParameters().

Friends And Related Symbol Documentation

◆ ParameterRegistry

friend class ParameterRegistry
friend

Definition at line 163 of file Parameter.H.

Member Data Documentation

◆ itsFrozen

volatile bool jevois::ParameterBase::itsFrozen
protected

When true, parameter is frozen (read-only, does not show up in help message)

Definition at line 159 of file Parameter.H.

◆ itsMutex

boost::shared_mutex jevois::ParameterBase::itsMutex
mutableprotected

Mutex to protect the parameter value.

Definition at line 158 of file Parameter.H.

◆ itsVirgin

bool jevois::ParameterBase::itsVirgin
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.


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