|
ADTF
|
Namespace for the ADTF Base SDK. More...
Namespaces | |
| namespace | ant |
| Namespace for all functionality of the ADTF Base SDK provided since v3.0. | |
| namespace | elasto |
| Namespace for all functionality of the ADTF Base SDK provided since v3.4. | |
| namespace | flash |
| Namespace for all functionality of the ADTF Base SDK provided since v3.5. | |
| namespace | giant |
| Namespace for all functionality of the ADTF Base SDK provided since v3.6. | |
| namespace | hollow |
| Namespace for all functionality of the ADTF Base SDK provided since v3.7. | |
| namespace | penguin |
| Namespace for all functionality of the ADTF Base SDK provided since v3.15. | |
| namespace | quiet |
| Namespace for all functionality of the ADTF Base SDK provided since v3.16. | |
| namespace | spider |
| Namespace for all functionality of the ADTF Base SDK provided since v3.18. | |
| namespace | testing |
| Namespace for all testing functionality of the ADTF Base SDK. | |
| namespace | yak |
| Namespace for all functionality of the ADTF Base SDK provided since v3.24. | |
Typedefs | |
| using | cRuntime = cADTFRuntime |
| Type definition for the Default Runtime of ADTF. | |
| using | IHashValueMap = ant::IHashValueMap |
| using | tPropertyVisitorCallback = std::function<void(const ant::IProperty& oProperty)> |
Enumerations | |
| enum | tADTFRunLevel |
Functions | |
| template<typename T> | |
| tResult | get_property_value (const IPropertyValue &oValue, T &xValue) |
| template<typename T> | |
| T | get_property_value (const IPropertyValue &oValue) |
| std::pair< std::string, std::string > | split_parents_and_leaf (const char *strPropertyPathAndName) |
| tResult | create_property_tree (ant::IProperties &oProperties, const char *strPath) |
| void | visit_properties (const ant::IProperties &oProperties, const tPropertyVisitorCallback &fnCallback) |
| template<typename SubPropertyType> | |
| void | visit_properties (const ant::IProperties &oProperties, const std::function< void(const char *, SubPropertyType)> &fnCallback) |
| void | visit_sub_properties (const ant::IProperty &oProperty, const tPropertyVisitorCallback &fnCallback) |
| template<typename SubPropertyType> | |
| void | visit_sub_properties (const ant::IProperty &oProperty, const std::function< void(const char *, SubPropertyType)> &fnCallback) |
| void | visit_sub_properties (const ant::IProperties &oProperties, const char *strPropertyName, const tPropertyVisitorCallback &fnCallback) |
| template<typename SubPropertyType> | |
| void | visit_sub_properties (const ant::IProperties &oProperties, const char *strPropertyName, const std::function< void(const char *, SubPropertyType)> &fnCallback) |
| tResult | visit_property (const ant::IProperties &oProperties, const char *strPropertyName, const std::function< tResult(const IProperty &oProperty)> &fnCallback) |
| tResult | visit_property_by_path (const ant::IProperties &oProperties, const char *strPropertyPathAndName, const std::function< tResult(const IProperty &oProperty)> &fnCallback) |
| template<typename VALUETYPE> | |
| tResult | set_property (ant::IProperties &oProperties, const char *strNameOfValue, VALUETYPE oValue) |
| tResult | set_property (ant::IProperties &oProperties, const char *strNameOfValue, const char *poValue) |
| template<typename T> | |
| T | get_property (const ant::IProperties &oProperties, const char *strNameOfValue, const T &oDefaultValue) |
| template<typename VALUETYPE> | |
| VALUETYPE | get_property (const ant::IProperties &oProperties, const char *strNameOfValue) |
| template<typename VALUETYPE> | |
| tResult | set_property_by_path (ant::IProperties &oProperties, const char *strPathAndName, VALUETYPE oValue) |
| template<typename T> | |
| T | get_property_by_path (const ant::IProperties &oProperties, const char *strPathAndName, const T &oDefaultValue) |
| template<typename VALUETYPE> | |
| VALUETYPE | get_property_by_path (const ant::IProperties &oProperties, const char *strPathAndName) |
| tResult | get_property_object_by_path (const ant::IProperties &oProperties, const char *strPropertyPathAndName, ant::IProperty &oProperty) |
| template<typename CALLABLE, typename... ARGS> | |
| runnable (CALLABLE &&, ARGS &&...) -> runnable< ant::IRunnable::RUN_UNSPECIFIED, ant::IRunnable, flash::IRunnable, CALLABLE && > | |
| template<typename DestinationTimeStamp, typename SourceTimeStamp> | |
| DestinationTimeStamp | duration_cast (const SourceTimeStamp &) noexcept |
| Duration cast base template to converted between different time resolution. | |
| ucom::ant::object_ptr< IErrorHandling::IErrorHandler > | create_error_handler (const char *strErrorSource, const char *strErrorCategory, IErrorHandling::tAction eDefaultAction) |
| void | handle_error (const char *strErrorSource, const char *strErrorCategory, IErrorHandling::tAction eDefaultAction, tResult oError) |
| std::string | nested_exceptions_to_string (const std::exception &error) |
| std::string | current_exception_to_string () |
| cResult | current_exception_to_result (const char *file, size_t line, const char *function) |
| IHashValueMap::tHashKey | create_hash_value_key (const char *strToHash) |
| adtf::util::cVariant | get_hash_value (const IHashValueMap &oMap, const IHashValueMap::tHashKey &oHash, const adtf::util::cVariant oDefault) |
| tResult | set_hash_value (IHashValueMap &oMap, const IHashValueMap::tHashKey &oHash, const adtf::util::cVariant oValue) |
| tResult | is_equal (const ant::IProperties &oLeftProperties, const ant::IProperties &oRightProperties) |
Namespace for the ADTF Base SDK.
Within this namespace all interfaces, classes and functions always refer to their last revised implementation (version namespace). When using types defined within this namespace it is guaranteed to always use the latest version of the types.
The ADTF Base SDK defines basic implementation for an ADTF System using the uCOM architecture.
The main focus of this package is to define a collection of ADTF basic functionality to be used in serveral components. It enriches the uCOM classes with certain additional types.
The most important implementation details are:
A runnable component is easily described by a adtf::base::IRunnable and defines the basic concept for a callable function.
| enum adtf::base::ant::tADTFRunLevel : int8_t |
The ADTF Runtime Level State are used to define a ADTF Runtime specialization for a adtf::ucom::ant::runtime.
| ucom::ant::object_ptr< IErrorHandling::IErrorHandler > adtf::base::elasto::create_error_handler | ( | const char * | strErrorSource, |
| const char * | strErrorCategory, | ||
| IErrorHandling::tAction | eDefaultAction ) |
Creates a new error handler. This works both if an error handling service is available or not.
| [in] | strErrorSource | The name of the error source. |
| [in] | strErrorCategory | The name of the error category. |
| [in] | eDefaultAction | The default action that should be taken if an error occurs. |
| IHashValueMap::tHashKey adtf::base::ant::create_hash_value_key | ( | const char * | strToHash | ) |
Generation of unambigious hash key for a string. This generation is independent to process and platform.
| [in] | strToHash | null terminated string to generate a hash key for. |
strToHash. | tResult adtf::base::create_property_tree | ( | ant::IProperties & | oProperties, |
| const char * | strPath ) |
Creates a property tree structure. It creates new intermediate properties if they do not exist already.
| [in,out] | oProperties | The property container to manipulate |
| [in] | strPath | The path of the properties, elements separated by slashes. |
|
inline |
Trys to format the current exception into a string. This works for std::exception and tResult exception objects.
|
noexcept |
Duration cast base template to converted between different time resolution.
| DestinationTimeStamp | the type to convert to |
| SourceTimeStamp | the type to convert from |
| adtf::util::cVariant adtf::base::ant::get_hash_value | ( | const IHashValueMap & | oMap, |
| const IHashValueMap::tHashKey & | oHash, | ||
| const adtf::util::cVariant | oDefault ) |
Retrieves a variant value for the hash key oHash out of the hashed value map oMap. If the value does not exists the oDefault is returned.
| [in] | oMap | The map to retrieve the value from. |
| [in] | oHash | The hash key of the value. |
| [in] | oDefault | default value if value does not exist. |
| VALUETYPE adtf::base::get_property | ( | const ant::IProperties & | oProperties, |
| const char * | strNameOfValue ) |
Gets a property value of the value type VALUETYPE from a IProperties implementation.
Make sure the property<VALUETYPE> implementation exists, see also property_type_definition.
| VALUETYPE | [in] value type of the value to return |
| oProperties | [in] property store where to get the property from. |
| strNameOfValue | [in] The Name of the property |
| T adtf::base::get_property | ( | const ant::IProperties & | oProperties, |
| const char * | strNameOfValue, | ||
| const T & | oDefaultValue ) |
Gets a property value of the value type VALUETYPE from a IProperties implementation.
Make sure the property<VALUETYPE> implementation exists, see also property_type_definition.
| VALUETYPE | [in] value type of the value to return |
| oProperties | [in] property store where to get the property from. |
| strNameOfValue | [in] The Name of the property |
| oDefaultValue | [in] default value of return value if property is not found. |
| tResult adtf::base::get_property_object_by_path | ( | const ant::IProperties & | oProperties, |
| const char * | strPropertyPathAndName, | ||
| ant::IProperty & | oProperty ) |
gets a property by path.
| [in] | oProperties | The properties where to get the path from. |
| [in] | strPropertyPathAndName | The name and path of the property. |
| [out] | oProperty | This will be set to the property value. |
| void adtf::base::elasto::handle_error | ( | const char * | strErrorSource, |
| const char * | strErrorCategory, | ||
| IErrorHandling::tAction | eDefaultAction, | ||
| tResult | oError ) |
Convenience method to report an error for short lived objects.
| [in] | strErrorSource | The name of the error source. |
| [in] | strErrorCategory | The name of the error category. |
| [in] | eDefaultAction | The default action that should be taken if an error occurs. |
| [in] | oError | The error result. |
| tResult adtf::base::spider::is_equal | ( | const ant::IProperties & | oLeftProperties, |
| const ant::IProperties & | oRightProperties ) |
Check if two property sets are equal.
| [in] | oLeftProperties | The operands for the check. |
| [in] | oRightProperties | The operands for the check. |
|
inline |
Formats nested std::exceptions into a string, line by line
| [in] | error | the exception |
| adtf::base::runnable | ( | CALLABLE && | , |
| ARGS && | ... ) -> runnable< ant::IRunnable::RUN_UNSPECIFIED, ant::IRunnable, flash::IRunnable, CALLABLE && > |
Deduction guides for runnable template to deduce template parameters from constructor arguments.
| tResult adtf::base::ant::set_hash_value | ( | IHashValueMap & | oMap, |
| const IHashValueMap::tHashKey & | oHash, | ||
| const adtf::util::cVariant | oValue ) |
Sets a variant value for the hash key oHash into the hashed value map oMap.
| [in] | oMap | The map to set the value to. |
| [in] | oHash | The hash key of the value. |
| [in] | oValue | value to set. |
| ERR_NOERROR | value is set |
| ERR_INVALID_TYPE | Type is not supported. See IHashValueMapValue::tType |
|
inline |
Sets a property of the value type const char* to a IProperties implementation.
This function specialization will be used to set const char* values as adtf::util::cString value.
| [in] | oProperties | property store where to set the property to. |
| [in] | strNameOfValue | the name of the property |
| [in] | poValue | const tCHar* value |
| ERR_NOERROR | Property is set. |
| ERR_NOT_IMPL | Property can not be set. |
| tResult adtf::base::set_property | ( | ant::IProperties & | oProperties, |
| const char * | strNameOfValue, | ||
| VALUETYPE | oValue ) |
Sets a property of the value type VALUETYPE to a IProperties implementation.
Make sure the property<VALUETYPE> implementation exists, see also property_type_definition.
| VALUETYPE | [in] value type of value oValue |
| [in] | oProperties | property store where to set the property to. |
| [in] | strNameOfValue | the name of the property |
| [in] | oValue | value of type VALUETYPE |
| ERR_NOERROR | Property is set. |
| ERR_NOT_IMPL | Property can not be set. |
| std::pair< std::string, std::string > adtf::base::split_parents_and_leaf | ( | const char * | strPropertyPathAndName | ) |
Splits a property path into the parent path and the property name.
| [in] | strPropertyPathAndName | Path separated by slashes. |
| void adtf::base::visit_properties | ( | const ant::IProperties & | oProperties, |
| const std::function< void(const char *, SubPropertyType)> & | fnCallback ) |
Utility function to visit all properties of a properties object
| SubPropertyType | The value type of the sub-properties. |
| [in] | oProperties | The properties object. |
| [out] | fnCallback | This is called for each sub-property. |
| void adtf::base::visit_properties | ( | const ant::IProperties & | oProperties, |
| const tPropertyVisitorCallback & | fnCallback ) |
Utility function to visit all properties of a properties object
| [in] | oProperties | The properties object. |
| [out] | fnCallback | This is called for each property. |
| void adtf::base::visit_sub_properties | ( | const ant::IProperties & | oProperties, |
| const char * | strPropertyName, | ||
| const std::function< void(const char *, SubPropertyType)> & | fnCallback ) |
Utility function to visit all sub-properties of a given property
| SubPropertyType | The value type of the sub-properties. |
| [in] | oProperties | The properties object. |
| [in] | strPropertyName | The name of the properties of which the sub-properties should be visited. |
| [out] | fnCallback | This is called for each sub-property. |
| void adtf::base::visit_sub_properties | ( | const ant::IProperties & | oProperties, |
| const char * | strPropertyName, | ||
| const tPropertyVisitorCallback & | fnCallback ) |
Utility function to visit all sub-properties of a given property
| [in] | oProperties | The properties object. |
| [in] | strPropertyName | The name of the properties of which the sub-properties should be visited. |
| [out] | fnCallback | This is called for each sub-property. |
| void adtf::base::visit_sub_properties | ( | const ant::IProperty & | oProperty, |
| const std::function< void(const char *, SubPropertyType)> & | fnCallback ) |
Utility function to visit all sub-properties of a given property
| SubPropertyType | The value type of the sub-properties. |
| [in] | oProperty | The property object. |
| [out] | fnCallback | This is called for each sub-property. |
| void adtf::base::visit_sub_properties | ( | const ant::IProperty & | oProperty, |
| const tPropertyVisitorCallback & | fnCallback ) |
Utility function to visit all sub-properties of a given property
| [in] | oProperty | The property object. |
| [out] | fnCallback | This is called for each sub-property. |