Privacy
An open-source, flexible 3D physical simulation framework
mars::cfg_manager::CFGParam Class Referenceabstract

#include <CFGParam.h>

Public Member Functions

 CFGParam (const cfgParamId &_id, const std::string &_group, const std::string &_name, const cfgParamType &_type)
 
 ~CFGParam ()
 
const cfgParamTypegetParamType () const
 
const cfgParamIdgetId () const
 
const std::string & getGroup () const
 
const std::string & getName () const
 
virtual bool getProperty (CFGProperty *property) const
 
virtual bool setProperty (const CFGProperty &_property)=0
 
virtual const std::string & getPropertyNameByIndex (unsigned int _index) const =0
 
virtual const cfgPropertyTypegetPropertyTypeByIndex (unsigned int _index) const =0
 
virtual unsigned int getPropertyIndexByName (const std::string &_name) const =0
 
virtual unsigned int getNrOfPropertys () const =0
 
virtual unsigned char getOption () const
 
virtual void setOption (const unsigned char _newOption)
 
virtual void unsetOption (const unsigned char _newOption)
 
void addClient (CFGClient *client)
 
void removeClient (CFGClient *client)
 
void writeToYAML (YAML::Emitter &out) const
 

Protected Member Functions

void updateClients (const CFGProperty &property)
 
void readFromYAML (const YAML::Node &node)
 
void readPropertyFromYAML (unsigned int index, const YAML::Node &node) const
 
void readSaveSettingFromYAML (const YAML::Node &node)
 
bool writeProperty (const CFGProperty &property) const
 

Protected Attributes

std::vector< CFGProperty * > propertys
 
utils::Mutex mutexPropertys
 
unsigned char options
 
const std::string emptyString
 
const cfgPropertyType noType
 

Private Attributes

cfgParamId id
 
std::string group
 
std::string paramName
 
cfgParamType paramType
 
std::vector< CFGClient * > cfgClients
 
utils::Mutex mutexCFGClients
 

Detailed Description

Definition at line 52 of file CFGParam.h.

Constructor & Destructor Documentation

◆ CFGParam()

mars::cfg_manager::CFGParam::CFGParam ( const cfgParamId _id,
const std::string &  _group,
const std::string &  _name,
const cfgParamType _type 
)

Definition at line 37 of file CFGParam.cpp.

◆ ~CFGParam()

mars::cfg_manager::CFGParam::~CFGParam ( )

Definition at line 48 of file CFGParam.cpp.

Member Function Documentation

◆ addClient()

void mars::cfg_manager::CFGParam::addClient ( CFGClient client)

Definition at line 99 of file CFGParam.cpp.

◆ getGroup()

const string & mars::cfg_manager::CFGParam::getGroup ( ) const

Definition at line 73 of file CFGParam.cpp.

◆ getId()

const cfgParamId & mars::cfg_manager::CFGParam::getId ( ) const

Definition at line 68 of file CFGParam.cpp.

◆ getName()

const string & mars::cfg_manager::CFGParam::getName ( ) const

Definition at line 78 of file CFGParam.cpp.

◆ getNrOfPropertys()

virtual unsigned int mars::cfg_manager::CFGParam::getNrOfPropertys ( ) const
pure virtual

◆ getOption()

unsigned char mars::cfg_manager::CFGParam::getOption ( ) const
virtual

Definition at line 83 of file CFGParam.cpp.

◆ getParamType()

const cfgParamType & mars::cfg_manager::CFGParam::getParamType ( ) const

Definition at line 63 of file CFGParam.cpp.

◆ getProperty()

bool mars::cfg_manager::CFGParam::getProperty ( CFGProperty property) const
virtual

Definition at line 121 of file CFGParam.cpp.

◆ getPropertyIndexByName()

virtual unsigned int mars::cfg_manager::CFGParam::getPropertyIndexByName ( const std::string &  _name) const
pure virtual

◆ getPropertyNameByIndex()

virtual const std::string& mars::cfg_manager::CFGParam::getPropertyNameByIndex ( unsigned int  _index) const
pure virtual

◆ getPropertyTypeByIndex()

virtual const cfgPropertyType& mars::cfg_manager::CFGParam::getPropertyTypeByIndex ( unsigned int  _index) const
pure virtual

◆ readFromYAML()

void mars::cfg_manager::CFGParam::readFromYAML ( const YAML::Node &  node)
protected

Definition at line 229 of file CFGParam.cpp.

◆ readPropertyFromYAML()

void mars::cfg_manager::CFGParam::readPropertyFromYAML ( unsigned int  index,
const YAML::Node &  node 
) const
protected

Definition at line 268 of file CFGParam.cpp.

◆ readSaveSettingFromYAML()

void mars::cfg_manager::CFGParam::readSaveSettingFromYAML ( const YAML::Node &  node)
protected

Definition at line 238 of file CFGParam.cpp.

◆ removeClient()

void mars::cfg_manager::CFGParam::removeClient ( CFGClient client)

Definition at line 108 of file CFGParam.cpp.

◆ setOption()

void mars::cfg_manager::CFGParam::setOption ( const unsigned char  _newOption)
virtual

Definition at line 88 of file CFGParam.cpp.

◆ setProperty()

virtual bool mars::cfg_manager::CFGParam::setProperty ( const CFGProperty _property)
pure virtual

◆ unsetOption()

void mars::cfg_manager::CFGParam::unsetOption ( const unsigned char  _newOption)
virtual

Definition at line 93 of file CFGParam.cpp.

◆ updateClients()

void mars::cfg_manager::CFGParam::updateClients ( const CFGProperty property)
protected

Definition at line 217 of file CFGParam.cpp.

◆ writeProperty()

bool mars::cfg_manager::CFGParam::writeProperty ( const CFGProperty property) const
protected

Definition at line 326 of file CFGParam.cpp.

◆ writeToYAML()

void mars::cfg_manager::CFGParam::writeToYAML ( YAML::Emitter &  out) const

Definition at line 157 of file CFGParam.cpp.

Member Data Documentation

◆ cfgClients

std::vector<CFGClient*> mars::cfg_manager::CFGParam::cfgClients
private

Definition at line 89 of file CFGParam.h.

◆ emptyString

const std::string mars::cfg_manager::CFGParam::emptyString
protected

Definition at line 106 of file CFGParam.h.

◆ group

std::string mars::cfg_manager::CFGParam::group
private

Definition at line 85 of file CFGParam.h.

◆ id

cfgParamId mars::cfg_manager::CFGParam::id
private

Definition at line 84 of file CFGParam.h.

◆ mutexCFGClients

utils::Mutex mars::cfg_manager::CFGParam::mutexCFGClients
private

Definition at line 90 of file CFGParam.h.

◆ mutexPropertys

utils::Mutex mars::cfg_manager::CFGParam::mutexPropertys
mutableprotected

Definition at line 95 of file CFGParam.h.

◆ noType

const cfgPropertyType mars::cfg_manager::CFGParam::noType
protected

Definition at line 107 of file CFGParam.h.

◆ options

unsigned char mars::cfg_manager::CFGParam::options
protected

Definition at line 97 of file CFGParam.h.

◆ paramName

std::string mars::cfg_manager::CFGParam::paramName
private

Definition at line 86 of file CFGParam.h.

◆ paramType

cfgParamType mars::cfg_manager::CFGParam::paramType
private

Definition at line 87 of file CFGParam.h.

◆ propertys

std::vector<CFGProperty*> mars::cfg_manager::CFGParam::propertys
protected

Definition at line 94 of file CFGParam.h.


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