OpenRTM-aist
1.2.1
|
ConfigBase abstract class. More...
#include <ConfigAdmin.h>
Public Types | |
typedef void(ConfigAdmin::* | CallbackFunc) (const char *, const char *) |
Public Member Functions | |
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... | |
virtual bool | update (const char *val)=0 |
Pure virtual function to update configuration parameter values. More... | |
Public Attributes | |
const char * | name |
Configuration name. More... | |
const char * | default_value |
Default value in string format. More... | |
Protected Attributes | |
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... | |
ConfigBase abstract class.
This is the abstract interface class to hold various configuration information. Concrete configuration classes must implement the following pure virtual functions.
This class provides public interface as follows.
typedef void(ConfigAdmin::* RTC::ConfigBase::CallbackFunc) (const char *, const char *) |
|
inline |
Constructer.
Constructer
name_ | Configuration name |
def_val | Default value in string format |
|
inlinevirtual |
Virtual Destructor.
Virtual Destructor
void RTC::ConfigBase::notifyUpdate | ( | const char * | key, |
const char * | val | ||
) |
Observer function to notify variable changed.
This function notifies variable has been changed.
Referenced by RTC::Config< VarType, TransFunc >::update().
void RTC::ConfigBase::setCallback | ( | ConfigAdmin * | cadmin, |
CallbackFunc | cbf | ||
) |
Setting callback.
This member function sets callback function which is called when variable is changed.
Referenced by RTC::ConfigAdmin::bindParameter().
|
pure virtual |
Pure virtual function to update configuration parameter values.
Pure virtual function to update configuration parameter by the configuration value.
val | The parameter values converted into character string format |
Implemented in RTC::Config< VarType, TransFunc >.
Referenced by RTC::ConfigAdmin::bindParameter().
const char* RTC::ConfigBase::default_value |
Default value in string format.
Referenced by RTC::Config< VarType, TransFunc >::update().
|
protected |
A pointer to the ConfigAdmin object.
|
protected |
A member function pointer to the callback function.
const char* RTC::ConfigBase::name |
Configuration name.
Referenced by RTC::ConfigAdmin::bindParameter(), RTC::ConfigAdmin::isActive(), and RTC::Config< VarType, TransFunc >::update().
|
protected |
Current value in string format.
Referenced by RTC::Config< VarType, TransFunc >::update().