|
ifw-core
5.0.0-pre2
|
Class to handle information for one parameter. More...
#include <parameter.hpp>
Public Member Functions | |
| Parameter () | |
| Parameter (const std::string name, const std::string value, const std::string comment="") | |
| Constructor settting internal members. More... | |
| template<class TYPE > | |
| Parameter (const std::string name, const TYPE &value, const std::string comment="") | |
| Constructor settting internal members. More... | |
| Parameter (const Parameter &source) | |
| Copy constructor. More... | |
| ~Parameter () | |
| Parameter & | Clear () |
| Clear the internal members. More... | |
| Parameter & | SetName (const std::string name) |
| Set parameter name. More... | |
| Parameter & | SetLowLevelName (const std::string name) |
| Set the low level parameter name. More... | |
| Parameter & | SetMetaName (const std::string name) |
| Set Meta-data parameter name. More... | |
| bool | NameDefined (const std::string &name, const bool tolerant=false) const |
| Check if a given name is defined in the object. More... | |
| bool | MatchName (const std::string &name_regex) const |
| Check if a given name is defined in the object; name specified as a regex. More... | |
| const std::string & | GetName () const |
| Return parameter name. More... | |
| const std::string & | GetLowLevelName () const |
| Return the low level parameter name. More... | |
| const std::string & | GetMetaName () const |
| Return Meta-data parameter name. More... | |
| std::string | GetNames () const |
| Generate a string summarising the three possible names (<name 1>/<name 2>/<name 3>). More... | |
| Parameter & | SetValue (const std::string &value) |
| Set parameter value. More... | |
| Parameter & | SetValue (const char *value) |
| Set parameter value. More... | |
| template<class TYPE > | |
| Parameter & | SetValue (TYPE value) |
| Set parameter value as its native data type. More... | |
| const std::string & | GetValue () const |
| Get parameter value as a string. More... | |
| bool | NoValue () const |
| Return true if no value has been set for the parameter. More... | |
| template<class TYPE > | |
| void | GetValue (TYPE &value) const |
| Get parameter value as its native data type. More... | |
| template<class TYPE > | |
| TYPE | GetValue () const |
| Get parameter value as its native data type. More... | |
| bool | GetValueAsBool () const |
| Return value as a boolean. If string representaion of value is not a boolean, the behaviour is undefined. More... | |
| int64_t | GetValueAsInt () const |
| Return value as integer. If string representaion of value is not an integer, the behaviour is undefined. More... | |
| int64_t | GetValueAsInt64 () const |
| Return value as 64 bit integer. If string representaion of value is not a 64 bit integer, the behaviour is undefined. More... | |
| double | GetValueAsDouble () const |
| Return value as a double. If string representaion of value is not a double, the behaviour is undefined. More... | |
| Parameter & | SetComment (const std::string &comment) |
| Set parameter comment. More... | |
| const std::string & | GetComment () const |
| Get parameter comment. More... | |
| std::string | ToString () const |
| Print out parameter. More... | |
| Parameter & | operator= (const Parameter &source) |
| Copy operator. More... | |
Protected Attributes | |
| std::string | m_name |
| std::string | m_low_level_name |
| std::string | m_meta_name |
| std::string | m_value |
| std::string | m_comment |
| std::string | m_no_value |
Class to handle information for one parameter.
| core::utils::param::Parameter::Parameter | ( | ) |
| core::utils::param::Parameter::Parameter | ( | const std::string | name, |
| const std::string | value, | ||
| const std::string | comment = "" |
||
| ) |
Constructor settting internal members.
|
inline |
Constructor settting internal members.
| core::utils::param::Parameter::Parameter | ( | const Parameter & | source | ) |
Copy constructor.
| core::utils::param::Parameter::~Parameter | ( | ) |
| Parameter & core::utils::param::Parameter::Clear | ( | ) |
Clear the internal members.
| const std::string & core::utils::param::Parameter::GetComment | ( | ) | const |
Get parameter comment.
| const std::string & core::utils::param::Parameter::GetLowLevelName | ( | ) | const |
Return the low level parameter name.
| const std::string & core::utils::param::Parameter::GetMetaName | ( | ) | const |
Return Meta-data parameter name.
| const std::string & core::utils::param::Parameter::GetName | ( | ) | const |
Return parameter name.
| std::string core::utils::param::Parameter::GetNames | ( | ) | const |
Generate a string summarising the three possible names (<name 1>/<name 2>/<name 3>).
| const std::string & core::utils::param::Parameter::GetValue | ( | ) | const |
Get parameter value as a string.
|
inline |
Get parameter value as its native data type.
|
inline |
Get parameter value as its native data type.
| bool core::utils::param::Parameter::GetValueAsBool | ( | ) | const |
Return value as a boolean. If string representaion of value is not a boolean, the behaviour is undefined.
| double core::utils::param::Parameter::GetValueAsDouble | ( | ) | const |
Return value as a double. If string representaion of value is not a double, the behaviour is undefined.
| int64_t core::utils::param::Parameter::GetValueAsInt | ( | ) | const |
Return value as integer. If string representaion of value is not an integer, the behaviour is undefined.
| int64_t core::utils::param::Parameter::GetValueAsInt64 | ( | ) | const |
Return value as 64 bit integer. If string representaion of value is not a 64 bit integer, the behaviour is undefined.
| bool core::utils::param::Parameter::MatchName | ( | const std::string & | name_regex | ) | const |
Check if a given name is defined in the object; name specified as a regex.
| bool core::utils::param::Parameter::NameDefined | ( | const std::string & | name, |
| const bool | tolerant = false |
||
| ) | const |
Check if a given name is defined in the object.
| bool core::utils::param::Parameter::NoValue | ( | ) | const |
Return true if no value has been set for the parameter.
| Parameter & core::utils::param::Parameter::SetComment | ( | const std::string & | comment | ) |
Set parameter comment.
| Parameter & core::utils::param::Parameter::SetLowLevelName | ( | const std::string | name | ) |
Set the low level parameter name.
| Parameter & core::utils::param::Parameter::SetMetaName | ( | const std::string | name | ) |
Set Meta-data parameter name.
| Parameter & core::utils::param::Parameter::SetName | ( | const std::string | name | ) |
Set parameter name.
| Parameter & core::utils::param::Parameter::SetValue | ( | const char * | value | ) |
Set parameter value.
| Parameter & core::utils::param::Parameter::SetValue | ( | const std::string & | value | ) |
Set parameter value.
|
inline |
Set parameter value as its native data type.
| std::string core::utils::param::Parameter::ToString | ( | ) | const |
Print out parameter.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |