ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
adtf::disptb Namespace Reference

Namespace for functionality provided by the Display Toolbox. More...

Namespaces

 mixinlib
 Namespace for functionality provided by the Mixin Library.
 

Functions

std::string BuildPropertyName (std::string const &prefix, std::string const &prop_name)
 Rule to build a full property name, based on its prefix and (base) name. More...
 
template<typename T >
void AttachPropertyEntry (const tChar *prop_name_prefix, const tChar *prop_name, T const &prop_val, adtf::base::ant::IConfiguration &configuration)
 Attaches a property and its value to a given configuration. More...
 
template<typename T >
GetPropertyValue (std::string const &prop_name_prefix, std::string const &prop_name, adtf::base::ant::IConfiguration const &configuration)
 Retrieves the value of a property from a given configuration. More...
 
bool HasProperty (std::string const &prop_name_prefix, std::string const &prop_name, adtf::base::ant::IConfiguration const &configuration)
 Query whether a configuration contains a property. More...
 
template<typename ValueType >
ValueType RestorePropertyValue (std::string const &prefix, std::string const &prop_name, adtf::base::ant::IConfiguration const &configuration)
 Restores the value of a property from a given configuration. More...
 

Variables

static constexpr char property_separator [] = "."
 Define a separator for properties.
 

Detailed Description

Namespace for functionality provided by the Display Toolbox.

Function Documentation

◆ AttachPropertyEntry()

void adtf::disptb::AttachPropertyEntry ( const tChar *  prop_name_prefix,
const tChar *  prop_name,
T const &  prop_val,
adtf::base::ant::IConfiguration &  configuration 
)

Attaches a property and its value to a given configuration.

Note: only use with supported property value types (parameter prop_val), e.g. cString, tBool, tFloat

Parameters
[in]prop_name_prefixThe prefix of the property.
[in]prop_nameThe name of the property.
[in]prop_valThe value of the property.
[in]configurationThe configuration to add the entry to.

Definition at line 42 of file adtf_display_toolbox_base.h.

References BuildPropertyName().

◆ BuildPropertyName()

std::string adtf::disptb::BuildPropertyName ( std::string const &  prefix,
std::string const &  prop_name 
)

Rule to build a full property name, based on its prefix and (base) name.

Parameters
[in]prefixThe prefix of the property.
[in]prop_nameThe name of the property.
Returns
String representing the full property name.

Referenced by AttachPropertyEntry(), GetPropertyValue(), and RestorePropertyValue().

◆ GetPropertyValue()

T adtf::disptb::GetPropertyValue ( std::string const &  prop_name_prefix,
std::string const &  prop_name,
adtf::base::ant::IConfiguration const &  configuration 
)

Retrieves the value of a property from a given configuration.

Note: only use with supported property value types (parameter prop_val), e.g. cString, tBool, tFloat

Parameters
[in]prop_name_prefixThe prefix of the property.
[in]prop_nameThe name of the property.
[in]configurationThe configuration to add the entry.
Returns
T The requested value type of the property.

Definition at line 58 of file adtf_display_toolbox_base.h.

References BuildPropertyName().

◆ HasProperty()

bool adtf::disptb::HasProperty ( std::string const &  prop_name_prefix,
std::string const &  prop_name,
adtf::base::ant::IConfiguration const &  configuration 
)

Query whether a configuration contains a property.

Parameters
[in]prop_name_prefixThe prefix of the property.
[in]prop_nameThe name of the property.
[in]configurationThe configuration to add the entry.
Returns
bool Boolean value indicating whether the configuration contains the property .

Referenced by RestorePropertyValue().

◆ RestorePropertyValue()

ValueType adtf::disptb::RestorePropertyValue ( std::string const &  prefix,
std::string const &  prop_name,
adtf::base::ant::IConfiguration const &  configuration 
)

Restores the value of a property from a given configuration.

If the property cannot be found inside the configuration, an error report is given. Note: only use with supported property value types (parameter prop_val), e.g. cString, tBool, tFloat

Parameters
[in]prefixThe prefix of the property.
[in]prop_nameThe name of the property.
[in]configurationThe configuration which should contain the property.
Returns
T The requested value type of the value which is to be restored..

Definition at line 86 of file adtf_display_toolbox_base.h.

References BuildPropertyName(), and HasProperty().