The Parameter::ParameterMap class provides a map functionality for Parameter::Parameter objects containing data of different types.
More...
#include <parameter.h>
|
template<typename T > |
const std::shared_ptr< GenericParameter< T > > & | getDynamicParameter (const std::string &name) const |
| Get the dynamic typed parameter contained in this map with the given name. More...
|
|
const std::shared_ptr< Parameter > & | getParameter (const std::string &name) const |
|
template<typename T > |
void | getParameterValue (const std::string &name, T &value) const |
| Get the value of a parameter in this map with the given name. More...
|
|
void | getParameterValueAsString (const std::string &name, std::string &out) const |
| Get the string representation of a value from a parameter in this map with the given name. More...
|
|
template<typename T > |
void | insertParameter (const std::string &name, const std::string &type, const T &value, const bool isValid=true) |
| Insert a new parameter in this map, with the given name, type and value. More...
|
|
void | insertParameter (const std::string &name, const std::string &type, const bool isValid=true) |
| Insert a new parameter in this map, with the given name and type. More...
|
|
const bool | isParamInMap (const std::string &name) const |
| Is a parameter with the given name contained within this map?. More...
|
|
| ParameterMap () |
| Parameter::ParameterMap constructor. More...
|
|
void | setParameterValueAsString (const std::string &name, const std::string &input, const bool isValid=true) |
| Set the value of a parameter in this map with the given name from a string. More...
|
|
const int | size () const |
| Get the amount of parameters contained within this map. More...
|
|
std::string | toString () const |
| Get the string representation of all parameters contained within this map. More...
|
|
The Parameter::ParameterMap class provides a map functionality for Parameter::Parameter objects containing data of different types.
Definition at line 163 of file parameter.h.
Parameter::ParameterMap::ParameterMap |
( |
| ) |
|
|
inline |
template<typename T >
const std::shared_ptr<GenericParameter<T> >& Parameter::ParameterMap::getDynamicParameter |
( |
const std::string & |
name | ) |
const |
|
inline |
Get the dynamic typed parameter contained in this map with the given name.
- Parameters
-
[in] | name | unique identifier of a parameter in this map |
- Returns
- the dynamic typed paramter
Definition at line 253 of file parameter.h.
const std::shared_ptr<Parameter>& Parameter::ParameterMap::getParameter |
( |
const std::string & |
name | ) |
const |
|
inline |
template<typename T >
void Parameter::ParameterMap::getParameterValue |
( |
const std::string & |
name, |
|
|
T & |
value |
|
) |
| const |
|
inline |
Get the value of a parameter in this map with the given name.
- Parameters
-
[in] | name | unique identifier of a parameter in this map |
[out] | value | value of a parameter in this map |
- Exceptions
-
Definition at line 235 of file parameter.h.
void Parameter::ParameterMap::getParameterValueAsString |
( |
const std::string & |
name, |
|
|
std::string & |
out |
|
) |
| const |
|
inline |
Get the string representation of a value from a parameter in this map with the given name.
- Parameters
-
[in] | name | unique identifier of a parameter in this map |
[out] | out | string representation of a value from a parameter in this map |
- Exceptions
-
Definition at line 271 of file parameter.h.
template<typename T >
void Parameter::ParameterMap::insertParameter |
( |
const std::string & |
name, |
|
|
const std::string & |
type, |
|
|
const T & |
value, |
|
|
const bool |
isValid = true |
|
) |
| |
|
inline |
Insert a new parameter in this map, with the given name, type and value.
Name must be unique within a ParameterMap object. Allowed parameter types: 'uint8_t', 'int8_t', 'uint16_t', 'int16_t', 'uint32_t', 'int32_t', 'uint64_t', 'int64_t', 'float32_t', 'float64_t', 'string_t', 'string_t[]'
- Parameters
-
[in] | name | unique identifier of a parameter in this map |
[in] | type | type of a parameter in this map |
[in] | value | value of a parameter in this map |
[in] | isValid | is the value of the inserted paramter valid? (Default: true) |
- Exceptions
-
Definition at line 219 of file parameter.h.
void Parameter::ParameterMap::insertParameter |
( |
const std::string & |
name, |
|
|
const std::string & |
type, |
|
|
const bool |
isValid = true |
|
) |
| |
|
inline |
Insert a new parameter in this map, with the given name and type.
Name must be unique within a ParameterMap object.
Allowed parameter types: 'uint8_t', 'int8_t', 'uint16_t', 'int16_t', 'uint32_t', 'int32_t', 'uint64_t', 'int64_t', 'float32_t', 'float64_t', 'string_t', 'string_t[]'
Parameter is set to a default value of 0.
- Parameters
-
[in] | name | unique identifier of a parameter in this map |
[in] | type | type of a parameter in this map |
[in] | isValid | is the value of the inserted paramter valid? (Default: true) |
- Exceptions
-
Definition at line 552 of file parameter.h.
const bool Parameter::ParameterMap::isParamInMap |
( |
const std::string & |
name | ) |
const |
|
inline |
Is a parameter with the given name contained within this map?.
- Parameters
-
[in] | name | unique name of a paramter |
- Returns
- true if parameter is contained within this map, else false.
Definition at line 178 of file parameter.h.
void Parameter::ParameterMap::setParameterValueAsString |
( |
const std::string & |
name, |
|
|
const std::string & |
input, |
|
|
const bool |
isValid = true |
|
) |
| |
|
inline |
Set the value of a parameter in this map with the given name from a string.
- Parameters
-
[in] | name | unique identifier of a parameter in this map |
[in] | input | value to be set encoded as ascii string |
[in] | isValid | is the given value valid? (Default: true) |
- Exceptions
-
Definition at line 406 of file parameter.h.
const int Parameter::ParameterMap::size |
( |
| ) |
const |
|
inline |
Get the amount of parameters contained within this map.
- Returns
- number of parameters in this map
Definition at line 186 of file parameter.h.
std::string Parameter::ParameterMap::toString |
( |
| ) |
const |
|
inline |
Get the string representation of all parameters contained within this map.
- Returns
- string of all parameters in this map
Definition at line 192 of file parameter.h.
std::unordered_map<std::string, std::shared_ptr<Parameter> > Parameter::ParameterMap::parameters |
|
private |
The documentation for this class was generated from the following file: