OpenRTM-aist  1.2.1
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
RTC::ConfigBase Class Referenceabstract

ConfigBase abstract class. More...

#include <ConfigAdmin.h>

Inheritance diagram for RTC::ConfigBase:
Inheritance graph
[legend]
Collaboration diagram for RTC::ConfigBase:
Collaboration graph
[legend]

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...
 
ConfigAdminm_admin
 A pointer to the ConfigAdmin object. More...
 
CallbackFunc m_callback
 A member function pointer to the callback function. More...
 

Detailed Description

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.

Since
0.4.0

Member Typedef Documentation

typedef void(ConfigAdmin::* RTC::ConfigBase::CallbackFunc) (const char *, const char *)

Constructor & Destructor Documentation

RTC::ConfigBase::ConfigBase ( const char *  name_,
const char *  def_val 
)
inline

Constructer.

Constructer

Parameters
name_Configuration name
def_valDefault value in string format
virtual RTC::ConfigBase::~ConfigBase ( void  )
inlinevirtual

Virtual Destructor.

Virtual Destructor

Member Function Documentation

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

virtual bool RTC::ConfigBase::update ( const char *  val)
pure virtual

Pure virtual function to update configuration parameter values.

Pure virtual function to update configuration parameter by the configuration value.

Parameters
valThe parameter values converted into character string format
Returns
Result of the setup

Implemented in RTC::Config< VarType, TransFunc >.

Referenced by RTC::ConfigAdmin::bindParameter().

Member Data Documentation

const char* RTC::ConfigBase::default_value

Default value in string format.

Referenced by RTC::Config< VarType, TransFunc >::update().

ConfigAdmin* RTC::ConfigBase::m_admin
protected

A pointer to the ConfigAdmin object.

CallbackFunc RTC::ConfigBase::m_callback
protected

A member function pointer to the callback function.

const char* RTC::ConfigBase::name
std::string RTC::ConfigBase::string_value
protected

Current value in string format.

Referenced by RTC::Config< VarType, TransFunc >::update().


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