11#include <adtfbase/configuration_intf.h>
12#include <adtfbase/configuration.h>
29inline std::string
BuildPropertyName(std::string
const& prefix, std::string
const& prop_name)
45 const tChar* prop_name,
47 adtf::base::ant::IConfiguration& configuration)
50 adtf::base::set_property<T>(configuration, full_prop_name.c_str(), prop_val);
64 std::string
const& prop_name,
65 adtf::base::ant::IConfiguration
const& configuration)
68 return adtf::base::get_property<T>(configuration, full_prop_name.c_str());
80 std::string
const& prop_name,
81 adtf::base::ant::IConfiguration
const& configuration)
83 adtf::ucom::object_ptr<const adtf::base::ant::IProperties> pProperties;
84 configuration.GetProperties(pProperties);
87 return pProperties->Exists(full_prop_name.c_str());
100template<
typename ValueType>
102 std::string
const& prop_name,
103 adtf::base::ant::IConfiguration
const& configuration)
105 if (!
HasProperty(prefix, prop_name, configuration))
107 std::string info =
"Could not find property '";
109 info.append(
"' for restoring its value.\n");
110 LOG_WARNING(info.c_str());
Namespace for functionality provided by the Display Toolbox.
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.
static constexpr char property_separator[]
Define a separator for properties.
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.
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.
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.
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.
Copyright © Audi Electronics Venture GmbH.