Public Member Functions | Private Attributes | List of all members
Parameter::GenericParameter< T > Class Template Reference

The Parameter::GenericParameter class is a sub class of the Parameter::Parameter class. More...

#include <parameter.h>

Inheritance diagram for Parameter::GenericParameter< T >:
Inheritance graph
[legend]

Public Member Functions

 GenericParameter (const std::string &name, const std::string &type)
 Parameter::GenericParameter constructor. More...
 
const T & getData () const
 Get the value this paramter contains. More...
 
const int getTypeByteSize () const
 Get the byte size of this parameter. More...
 
const bool isTypeArithmetic () const
 Is this parameter an arithmetic type? More...
 
const bool isTypeSigned () const
 Get the sign of this parameter. More...
 
void setData (const T &m_data)
 Set the value this paramter contains. More...
 
- Public Member Functions inherited from Parameter::Parameter
const std::string & getName () const
 Get the name of this parameter. More...
 
const std::string & getType () const
 Get the type of this parameter. More...
 
const bool isValid () const
 Is this parameters value NaN/invalid? More...
 
 Parameter (const std::string &name, const std::string &type)
 Parameter::Parameter constructor. More...
 
void setValid (const bool isParamValid)
 Defines whether this paramters value is NaN/invalid or not. More...
 
virtual ~Parameter ()
 Parameter::Parameter destructor. More...
 

Private Attributes

m_data
 

Detailed Description

template<typename T>
class Parameter::GenericParameter< T >

The Parameter::GenericParameter class is a sub class of the Parameter::Parameter class.

This class is a workaround allowing c++ Lists/Arrays/etc. to contain multiple dynamic types.

Definition at line 109 of file parameter.h.

Constructor & Destructor Documentation

template<typename T >
Parameter::GenericParameter< T >::GenericParameter ( const std::string &  name,
const std::string &  type 
)
inline

Parameter::GenericParameter constructor.

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 the parameter
[in]typetype of the parameter

Definition at line 122 of file parameter.h.

Member Function Documentation

template<typename T >
const T& Parameter::GenericParameter< T >::getData ( ) const
inline

Get the value this paramter contains.

Returns
value of this parameter

Definition at line 151 of file parameter.h.

template<typename T >
const int Parameter::GenericParameter< T >::getTypeByteSize ( ) const
inlinevirtual

Get the byte size of this parameter.

Returns
byte size of this parameter

Implements Parameter::Parameter.

Definition at line 130 of file parameter.h.

template<typename T >
const bool Parameter::GenericParameter< T >::isTypeArithmetic ( ) const
inlinevirtual

Is this parameter an arithmetic type?

Returns
true if type equals signed/unsigned char/short/int/long etc. or float/double

Implements Parameter::Parameter.

Definition at line 141 of file parameter.h.

template<typename T >
const bool Parameter::GenericParameter< T >::isTypeSigned ( ) const
inlinevirtual

Get the sign of this parameter.

Returns
sign of this parameter, If (sign(parameter)== +) -> 1, Else -1.

Implements Parameter::Parameter.

Definition at line 135 of file parameter.h.

template<typename T >
void Parameter::GenericParameter< T >::setData ( const T &  m_data)
inline

Set the value this paramter contains.

Parameters
[in]m_datavalue to be set

Definition at line 146 of file parameter.h.

Member Data Documentation

template<typename T >
T Parameter::GenericParameter< T >::m_data
private

Value of this parameter.

Definition at line 154 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