Public Member Functions | Private Attributes | List of all members
Parameter::ParameterMap Class Reference

The Parameter::ParameterMap class provides a map functionality for Parameter::Parameter objects containing data of different types. More...

#include <parameter.h>

Public Member Functions

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...
 

Private Attributes

std::unordered_map< std::string, std::shared_ptr< Parameter > > parameters
 

Detailed Description

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.

Constructor & Destructor Documentation

Parameter::ParameterMap::ParameterMap ( )
inline

Parameter::ParameterMap constructor.

Definition at line 169 of file parameter.h.

Member Function Documentation

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]nameunique 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

Definition at line 259 of file parameter.h.

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]nameunique identifier of a parameter in this map
[out]valuevalue of a parameter in this map
Exceptions
std::exception

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]nameunique identifier of a parameter in this map
[out]outstring representation of a value from a parameter in this map
Exceptions
std::exception

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]nameunique identifier of a parameter in this map
[in]typetype of a parameter in this map
[in]valuevalue of a parameter in this map
[in]isValidis the value of the inserted paramter valid? (Default: true)
Exceptions
std::exception

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]nameunique identifier of a parameter in this map
[in]typetype of a parameter in this map
[in]isValidis the value of the inserted paramter valid? (Default: true)
Exceptions
std::exception

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]nameunique 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]nameunique identifier of a parameter in this map
[in]inputvalue to be set encoded as ascii string
[in]isValidis the given value valid? (Default: true)
Exceptions
std::exception

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.

Member Data Documentation

std::unordered_map<std::string, std::shared_ptr<Parameter> > Parameter::ParameterMap::parameters
private

Parameter map (first: parameter name, second: Parameter::Parameter)

Definition at line 657 of file parameter.h.


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


pses_ucbridge
Author(s): Sebastian Ehmes
autogenerated on Sat Oct 28 2017 19:16:13