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

#include <jevois/Component/Parameter.H>

template<typename T>
class jevois::DynamicParameter< T >

Dynamic parameter added to a component at runtime.

Dynamic parameters can only be accessed by descriptor at the Component level (using getParamVal(), setParamVal(), etc), since there is no unique class type for them and the owning Component does not inherit from them. Typically for use via Component::addDynamicParameter(). Use with caution. Mainly developed to enable endowing python modules with JeVois parameters.

Definition at line 393 of file Parameter.H.

Inheritance diagram for jevois::DynamicParameter< T >:
Collaboration diagram for jevois::DynamicParameter< T >:

Public Types

typedef DynamicParameter< T > type
 Our type. More...
 

Public Member Functions

 DynamicParameter (Component *comp, ParameterDef< T > const &pdef)
 Constructor. More...
 
virtual ~DynamicParameter ()
 Destructor. More...
 
virtual const Componentowner () const override
 Handle to owning component. More...
 
const ParameterDef< T > & def () const
 Access to our parameter def. More...
 
- Public Member Functions inherited from jevois::ParameterCore< T >
 ParameterCore (ParameterDef< T > const &def)
 Constructor. More...
 
virtual ~ParameterCore ()
 Destructor. More...
 
virtual const std::string & name () const override
 Get the parameter name. More...
 
virtual std::string descriptor () const override
 Get the parameter fully-qualified name, aka descriptor. More...
 
get () const
 Get the value of this Parameter. More...
 
void set (T const &newVal)
 Set the value of this Parameter. More...
 
virtual void strset (std::string const &valstring) override
 Set the value from a string representation of it. More...
 
virtual const std::string strget () const override
 Get the value as a string representation of it. More...
 
virtual const ParameterSummary summary () const override
 Get summary info about this parameter. More...
 
virtual void reset () override
 Reset this parameter to its default value. More...
 
void changeParameterDef (ParameterDef< T > const &def)
 Change the ParameterDef of this parameter. More...
 
void setCallback (std::function< void(T const &)> cb)
 Set the parameter's callback. More...
 
- Public Member Functions inherited from jevois::ParameterBase
 ParameterBase ()
 Constructor. More...
 
virtual ~ParameterBase ()
 Destructor, will remove the parameter from its owner component. More...
 
void freeze ()
 Freeze this parameter, it becomes read-only and will not show up in the help message. More...
 
void unFreeze ()
 Unfreeze this parameter, it becomes read-write and will show up in the help message. More...
 
void freeze (bool doit)
 Alternate syntax that can be used instead of freeze()/unFreeze(), useful for programmatic freezing. More...
 

Additional Inherited Members

- Protected Attributes inherited from jevois::ParameterBase
boost::shared_mutex itsMutex
 Mutex to protect the parameter value. More...
 
volatile bool itsFrozen
 When true, parameter is frozen (read-only, does not show up in help message) More...
 
bool itsVirgin
 Param has not yet been explicitly set, need to call the callback (if any) at init time. More...
 

Member Typedef Documentation

◆ type

template<typename T >
typedef DynamicParameter<T> jevois::DynamicParameter< T >::type

Our type.

Definition at line 398 of file Parameter.H.

Constructor & Destructor Documentation

◆ DynamicParameter()

template<typename T >
jevois::DynamicParameter< T >::DynamicParameter ( Component comp,
ParameterDef< T > const &  pdef 
)

Constructor.

◆ ~DynamicParameter()

template<typename T >
virtual jevois::DynamicParameter< T >::~DynamicParameter ( )
virtual

Destructor.

Member Function Documentation

◆ def()

template<typename T >
const ParameterDef<T>& jevois::DynamicParameter< T >::def ( ) const

Access to our parameter def.

◆ owner()

template<typename T >
virtual const Component* jevois::DynamicParameter< T >::owner ( ) const
overridevirtual

Handle to owning component.

Implements jevois::ParameterCore< T >.


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