OpenRTM-aist
1.2.1
|
#include <ConfigAdmin.h>
Public Member Functions | |
Config (const char *name, VarType &var, const char *def_val, TransFunc trans=coil::stringTo) | |
Constructor. More... | |
virtual | ~Config (void) |
Virtual Destructor. More... | |
virtual bool | update (const char *val) |
Update a bind parameter value. More... | |
Public Member Functions inherited from RTC::ConfigBase | |
ConfigBase (const char *name_, const char *def_val) | |
Constructer. More... | |
virtual | ~ConfigBase (void) |
Virtual Destructor. More... | |
void | setCallback (ConfigAdmin *cadmin, CallbackFunc cbf) |
Setting callback. More... | |
void | notifyUpdate (const char *key, const char *val) |
Observer function to notify variable changed. More... | |
Protected Attributes | |
VarType & | m_var |
Configuration parameter variable. More... | |
TransFunc | m_trans |
Transformation function to convert configuration parameter type into string format. More... | |
Protected Attributes inherited from RTC::ConfigBase | |
std::string | string_value |
Current value in string format. More... | |
ConfigAdmin * | m_admin |
A pointer to the ConfigAdmin object. More... | |
CallbackFunc | m_callback |
A member function pointer to the callback function. More... | |
Additional Inherited Members | |
Public Types inherited from RTC::ConfigBase | |
typedef void(ConfigAdmin::* | CallbackFunc) (const char *, const char *) |
Public Attributes inherited from RTC::ConfigBase | |
const char * | name |
Configuration name. More... | |
const char * | default_value |
Default value in string format. More... | |
Config class.
Class to hold the configuration parameter information. Specify the data type of the configuration as <VarType> Specify transformation function to convert data type set as <TransFunc> into string format.
VarType | Cariable to hold configuration parameter |
TransFunc | Transformation function to transform the stored data type into string format. |
|
inline |
Constructor.
Constructor
name | Configuration parameter name |
var | Configuration parameter variable |
def_val | Default value in string format |
trans | Function to transform into string format |
|
inlinevirtual |
Virtual Destructor.
Virtual Destructor.
|
inlinevirtual |
Update a bind parameter value.
Update configuration paramater by the configuration value.
val | The parameter values converted into character string format |
Implements RTC::ConfigBase.
References RTC::ConfigBase::default_value, RTC::ConfigBase::name, RTC::ConfigBase::notifyUpdate(), and RTC::ConfigBase::string_value.
|
protected |
Transformation function to convert configuration parameter type into string format.
|
protected |
Configuration parameter variable.