EEROS
1.0.0.0
API for the EEROS Real-Time Robotics Framework
|
Configuration. More...
#include <Config.hpp>
Public Member Functions | |
Config (const char *path=nullptr) | |
virtual | ~Config () |
virtual void | loadDefaults () |
virtual bool | save (const char *path=nullptr)=0 |
virtual bool | load (const char *path=nullptr)=0 |
Protected Member Functions | |
virtual void | add (const char *name, int &value) |
virtual void | add (const char *name, double &value) |
virtual void | add (const char *name, std::size_t length, int *start, int *end, int default_value=-1) |
virtual void | add (const char *name, std::size_t length, double *start, double *end, double default_value=NAN) |
virtual void | add (const char *name, std::string &value) |
template<typename T , std::size_t N> | |
void | add (const char *name, std::array< T, N > &value) |
Protected Attributes | |
const char * | path |
std::map< const char *, ConfigPropertyAccessor, CharPtrCompare > | properties |
Configuration.
This is the base class for a configuration to be saved to or loaded from disk. A configuration might be useful to keep calibration values or setup data.
Config::Config | ( | const char * | path = nullptr | ) |
Creates a configuration
path | Name of the configuration. |
|
virtual |
Destructor, do not call manually.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protected |
|
pure virtual |
Loads a configuration, must be overwritten by a derived clas
path | Name of the configuration. |
Implemented in eeros::config::FileConfig.
|
virtual |
Loads a default configuration, must be overwritten by a derived class.
|
pure virtual |
Saves a configuration, must be overwritten by a derived clas
path | Name of the configuration. |
Implemented in eeros::config::FileConfig.
|
protected |
|
protected |