iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::ParameterBase Class Referenceabstract

#include <nrt/Core/Model/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 63 of file Parameter.H.

Inheritance diagram for nrt::ParameterBase:
nrt::ParameterCore< T >

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. If you need more info about this parameter, try summary()
 
Componentowner ()
 Get the Component to which this Parameter is attached, or nullptr.
 
Component const * owner () const
 Get the Component to which this Parameter is attached, or nullptr; const version.
 
virtual void strset (std::string const &valstring)=0
 Set the value from a string representation of it. More...
 
virtual std::string const strget () const =0
 Get the value as a string representation of it.
 
virtual ParameterSummary const summary () const =0
 Get summary info about this parameter.
 

Protected Attributes

boost::shared_mutex itsMutex
 
Create a Module Port for this Parameter. See Module.H for more on Module.

/virtual void createPort(ModuleParamPort const ptype, std::string const & module, / std::string const & descriptor) = 0; More...

 

Member Function Documentation

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

Set the value from a string representation of it.

Exceptions
nrt::exception::ParameterExceptionif the given string cannot be converted (using boost::lexical_cast) to a Parameter value, or the value is invalid according to our valid values spec.

Implemented in nrt::ParameterCore< T >.

Member Data Documentation

boost::shared_mutex nrt::ParameterBase::itsMutex
mutableprotected

Create a Module Port for this Parameter. See Module.H for more on Module.

/virtual void createPort(ModuleParamPort const ptype, std::string const & module, / std::string const & descriptor) = 0;

Delete a Module Port for this Parameter. See Module.H for more on Module.

/virtual void deletePort(ModuleParamPort const ptype) = 0; Set the topic of a Parameter Poster

Will throw if the port is not found, eg, it has not been created Set the topic filter of a Parameter Checker

Will throw if the port is not found, eg, it has not been created Set the topic filter of a Parameter Subscriber

Will throw if the port is not found, eg, it has not been created Mutex to protect the parameter value

Definition at line 112 of file Parameter.H.


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