The Config class is the base class of all specialized configurations that have a direct key -> value mapping.
More...
#include <armarx/control/hardware_config/Config.h>
|
template<typename T > |
T | get (const std::string name) |
|
template<typename T > |
std::optional< T > | get_nothrow (const std::string name) |
|
template<class T > |
void | set (const std::string name, T value, ConfigTag tag) |
|
void | setBool (const std::string name, bool value, ConfigTag tag) |
|
void | setBoolList (const std::string name, std::list< bool > value, ConfigTag tag) |
|
void | setFloat (const std::string name, float value, ConfigTag tag) |
|
void | setFloatList (const std::string name, std::list< float > value, ConfigTag tag) |
|
void | setInt (const std::string name, std::int32_t value, ConfigTag tag) |
|
void | setIntList (const std::string name, std::list< std::int32_t > value, ConfigTag tag) |
|
void | setLinearConfig (const std::string name, types::LinearConfig &&value, ConfigTag tag) |
|
void | setModularConvertedValueConfig (const std::string name, types::ModularConvertedValueConfig &&value, ConfigTag tag) |
|
void | setString (const std::string name, std::string value, ConfigTag tag) |
|
void | setUint (const std::string name, std::uint32_t value, ConfigTag tag) |
|
void | setUintList (const std::string name, std::list< std::uint32_t > value, ConfigTag tag) |
|
The Config class is the base class of all specialized configurations that have a direct key -> value mapping.
Direct instantiation is always possible, if this mapping is all that is needed. A Config in read-only and only ConfigParser can change the contents.
Definition at line 91 of file Config.h.
◆ Config()
◆ ~Config()
◆ checkAllItemsRead()
bool checkAllItemsRead |
( |
std::vector< std::string > & |
errors | ) |
const |
|
virtual |
This method is called once the device has read the configuration data it needs.
In this method it should be checked, whether there are entries in this Config (including config objects that are stored in the Config).
- Returns
- true iff all items in this config have been read
Reimplemented in DeviceConfig, and SlaveConfig.
Definition at line 76 of file Config.cpp.
◆ get()
T get |
( |
const std::string |
name | ) |
|
|
inlineprotected |
◆ get_nothrow()
std::optional<T> get_nothrow |
( |
const std::string |
name | ) |
|
|
inlineprotected |
◆ getBool()
bool getBool |
( |
const std::string |
name | ) |
|
Get a Bool typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 10 of file Config.cpp.
◆ getBoolList()
std::list< bool > getBoolList |
( |
const std::string |
name | ) |
|
Get a BoolList (std::list<bool>) typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 52 of file Config.cpp.
◆ getFloat()
float getFloat |
( |
const std::string |
name | ) |
|
Get a Float typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 16 of file Config.cpp.
◆ getFloatList()
Get a FloatList (std::list<float>) typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 58 of file Config.cpp.
◆ getInt()
std::int32_t getInt |
( |
const std::string |
name | ) |
|
Get a Int (std::int32_t) typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 28 of file Config.cpp.
◆ getIntList()
std::list< std::int32_t > getIntList |
( |
const std::string |
name | ) |
|
Get a IntList (std::list<std::int32_t>) typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 70 of file Config.cpp.
◆ getLinearConfig()
Get a LinearConvertedValue typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 34 of file Config.cpp.
◆ getMatrix()
Eigen::Matrix<Type, Rows, Columns> getMatrix |
( |
const std::string |
name | ) |
|
|
inline |
Get a Matrix by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 198 of file Config.h.
◆ getModularConvertedValueConfig()
Get a ModularConvertedValue typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 40 of file Config.cpp.
◆ getString()
std::string getString |
( |
const std::string |
name | ) |
|
Get a String typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 46 of file Config.cpp.
◆ getUint()
std::uint32_t getUint |
( |
const std::string |
name | ) |
|
Get a Uint (std::uint32_t) typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 22 of file Config.cpp.
◆ getUintList()
std::list< std::uint32_t > getUintList |
( |
const std::string |
name | ) |
|
Get a UIntList (std::list<std::uint32_t>) typed Config attribute by name.
- Parameters
-
name | the name of this Config attribute |
- Exceptions
-
- Returns
- the value
Definition at line 64 of file Config.cpp.
◆ onParsingFinished()
void onParsingFinished |
( |
| ) |
|
|
virtual |
◆ print()
void print |
( |
std::stringstream & |
s, |
|
|
int |
indention |
|
) |
| const |
|
virtual |
◆ set()
void set |
( |
const std::string |
name, |
|
|
T |
value, |
|
|
ConfigTag |
tag |
|
) |
| |
|
inlineprotected |
◆ setBool()
void setBool |
( |
const std::string |
name, |
|
|
bool |
value, |
|
|
ConfigTag |
tag |
|
) |
| |
|
protected |
◆ setBoolList()
◆ setFloat()
◆ setFloatList()
◆ setInt()
void setInt |
( |
const std::string |
name, |
|
|
std::int32_t |
value, |
|
|
ConfigTag |
tag |
|
) |
| |
|
protected |
◆ setIntList()
void setIntList |
( |
const std::string |
name, |
|
|
std::list< std::int32_t > |
value, |
|
|
ConfigTag |
tag |
|
) |
| |
|
protected |
◆ setLinearConfig()
◆ setModularConvertedValueConfig()
◆ setString()
void setString |
( |
const std::string |
name, |
|
|
std::string |
value, |
|
|
ConfigTag |
tag |
|
) |
| |
|
protected |
◆ setUint()
void setUint |
( |
const std::string |
name, |
|
|
std::uint32_t |
value, |
|
|
ConfigTag |
tag |
|
) |
| |
|
protected |
◆ setUintList()
void setUintList |
( |
const std::string |
name, |
|
|
std::list< std::uint32_t > |
value, |
|
|
ConfigTag |
tag |
|
) |
| |
|
protected |
◆ ConfigParser
◆ ControllerConfig
◆ items
The documentation for this class was generated from the following files: