RTC::Config< VarType, TransFunc > Class Template Reference

Config class. More...

#include <ConfigAdmin.h>

Inheritance diagram for RTC::Config< VarType, TransFunc >:
RTC::ConfigBase

List of all members.

Public Member Functions

 Config (const char *name, VarType &var, const char *def_val, TransFunc trans=coil::stringTo)
 Constructor.
virtual ~Config (void)
virtual bool update (const char *val)
 Update a bind parameter value.

Protected Attributes

VarType & m_var
 Configuration parameter variable.
TransFunc m_trans
 Transformation function to convert configuration parameter type into string format.

Detailed Description

template<typename VarType, typename TransFunc = bool (*)(VarType&, const char*)>
class RTC::Config< VarType, TransFunc >

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.

Parameters:
VarType Cariable to hold configuration parameter
TransFunc Transformation function to transform the stored data type into string format.
Since:
0.4.0

Constructor & Destructor Documentation

template<typename VarType , typename TransFunc = bool (*)(VarType&, const char*)>
RTC::Config< VarType, TransFunc >::Config ( const char *  name,
VarType &  var,
const char *  def_val,
TransFunc  trans = coil::stringTo 
) [inline]

Constructor.

Constructor

Parameters:
name Configuration parameter name
var Configuration parameter variable
def_val Default value in string format
trans Function to transform into string format
template<typename VarType , typename TransFunc = bool (*)(VarType&, const char*)>
virtual RTC::Config< VarType, TransFunc >::~Config ( void   )  [inline, virtual]

Virtual Destructor.


Member Function Documentation

template<typename VarType , typename TransFunc = bool (*)(VarType&, const char*)>
virtual bool RTC::Config< VarType, TransFunc >::update ( const char *  val  )  [inline, virtual]

Update a bind parameter value.

Update configuration paramater by the configuration value.

Parameters:
val The parameter values converted into character string format
Returns:
Update result (Successful:true, Failed:false)

Implements RTC::ConfigBase.


Member Data Documentation

template<typename VarType , typename TransFunc = bool (*)(VarType&, const char*)>
TransFunc RTC::Config< VarType, TransFunc >::m_trans [protected]

Transformation function to convert configuration parameter type into string format.

template<typename VarType , typename TransFunc = bool (*)(VarType&, const char*)>
VarType& RTC::Config< VarType, TransFunc >::m_var [protected]

Configuration parameter variable.

Generated on Fri Oct 28 18:31:18 2016 for OpenRTM-aist by  doxygen 1.6.3