ADTF
Loading...
Searching...
No Matches
adtf::base Namespace Reference

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.
 

Classes

class  adtf_memory
 bring latest ant::adtf_memory to users scope More...
 
class  adtf_memory_buffer
 Template class implementation for the IRawMemory interface. More...
 
struct  adtf_memory_forward
 bring latest ant::adtf_memory_forward to users scope More...
 
class  adtf_memory_trivial_type
 bring latest nitro::adtf_memory_trivially_type to users scope More...
 
class  adtf_string
 Wrapping template for a rvalue reference of an IString interface for the type T. More...
 
struct  adtf_string_forward
 
struct  adtf_version_customer
 
struct  adtf_version_default
 
class  cADTFRuntime
 
class  cConfiguration
 
class  cErrorChecker
 Error checker implementation for easy use of the error handler elasto::IErrorHandling::IErrorHandler. More...
 
class  cErrorHandler
 
class  configuration
 
class  cProperties
 
class  cPropertiesHelper
 
class  cProperty
 
struct  cPropertyStringConversion
 
class  cPropertyValue
 
class  cRawMemoryRedirect
 
class  cStringRedirect
 
class  hash_value_map
 
class  IADTFRuntime
 
class  IConfiguration
 
class  IErrorHandling
 
class  IPluginLoader
 
class  IProperties
 
class  IProperty
 
class  IPropertyObserver
 
class  IPropertyValue
 
class  IRawMemory
 bring latest ant::IRawMemory to users scope More...
 
class  IRunnable
 bring ant::IRunnable to users scope More...
 
class  IString
 bring latest IString to users scope More...
 
class  property
 
struct  property_attached_configuration_type
 
struct  property_type_conversion
 
struct  property_type_default_conversion
 
struct  property_type_definition
 
class  property_value
 
class  property_variable
 Property Variable template for the given T. A Property Variable will store a copy of a property value of the specified type T. More...
 
class  runnable
 
struct  tNanoSeconds
 A timestamp with nanosecond precision. More...
 
struct  tree_node_property_type
 

Typedefs

using cRuntime = cADTFRuntime
 Type definition for the Default Runtime of ADTF.
 
using IHashValueMap = ant::IHashValueMap
 

Enumerations

enum  tADTFRunLevel
 

Functions

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.
 
template<typename VALUETYPE>
VALUETYPE get_property (const IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oDefaultValue)
 Get the property content converted to the VALUETYPE.
 
template<typename VALUETYPE>
tResult set_property (IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oValue)
 Set the property.
 
template<typename VALUETYPE>
tResult set_property_by_path (IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oValue)
 
template<typename VALUETYPE>
VALUETYPE get_property_by_path (const IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oDefaultValue)
 
tResult get_property_object_by_path (const ant::IConfiguration &oConfiguration, const char *strPropertyPathAndName, ant::IProperty &oProperty)
 Retrieves a property reference under the given oConfiguration by path.
 
ucom::ant::object_ptr< IErrorHandling::IErrorHandlercreate_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)
 
template<typename T>
tResult get_property_value (const IPropertyValue &oValue, T &xValue)
 
template<typename VALUETYPE>
tResult set_property (IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oValue)
 Set the property.
 
template<typename VALUETYPE>
VALUETYPE get_property (const IConfiguration &oConfiguration, const char *strNameOfValue, VALUETYPE oDefaultValue)
 Get the property content converted to the VALUETYPE.
 
template<typename VALUETYPE>
tResult set_property_by_path (IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oValue)
 
template<typename VALUETYPE>
VALUETYPE get_property_by_path (const IConfiguration &oConfiguration, const char *strPathAndName, VALUETYPE oDefaultValue)
 
tResult get_property_object_by_path (const ant::IConfiguration &oConfiguration, const char *strPropertyPathAndName, ant::IProperty &oProperty)
 Retrieves a property reference under the given oConfiguration by path.
 
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)
 
void visit_sub_properties (const ant::IProperty &oProperty, const tPropertyVisitorCallback &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)
 
tResult is_equal (const ant::IProperties &oLeftProperties, const ant::IProperties &oRightProperties)
 

Detailed Description

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:

  • Definition of ADTF Runtime and ADTF Runlevel
  • Property handling and confinguration interface
  • Binary compatible adtf::base::IString interface to retrieve strings from other plugin in a thread-safe way
  • Binary compatible memory writing and reading interface adtf::base::IRawMemory

A runnable component is easily described by a adtf::base::IRunnable and defines the basic concept for a callable function.

Enumeration Type Documentation

◆ tADTFRunLevel

The ADTF Runtime Level State are used to define a ADTF Runtime specialization for a adtf::ucom::ant::runtime.

Function Documentation

◆ create_error_handler()

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.

Parameters
[in]strErrorSourceThe name of the error source.
[in]strErrorCategoryThe name of the error category.
[in]eDefaultActionThe default action that should be taken if an error occurs.
Returns
pHandler The new handler.

◆ create_hash_value_key()

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.

Parameters
[in]strToHashnull terminated string to generate a hash key for.
Returns
Hash key for strToHash.

◆ create_property_tree()

tResult adtf::base::elasto::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.

Parameters
[in,out]oPropertiesThe property container to manipulate
[in]strPathThe path of the properties, elements separated by slashes.
Returns
Standard result.

◆ current_exception_to_string()

std::string A_UTILS_NS::detail::current_exception_to_string ( )
inline

Trys to format the current exception into a string. This works for std::exception and tResult exception objects.

Returns
The formatted string.

◆ duration_cast()

template<typename DestinationTimeStamp, typename SourceTimeStamp>
DestinationTimeStamp adtf::base::flash::duration_cast ( const SourceTimeStamp & )
noexcept

Duration cast base template to converted between different time resolution.

Template Parameters
DestinationTimeStampthe type to convert to
SourceTimeStampthe type to convert from

◆ get_hash_value()

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.

Parameters
[in]oMapThe map to retrieve the value from.
[in]oHashThe hash key of the value.
[in]oDefaultdefault value if value does not exist.
Returns
retrieved value.

◆ get_property() [1/2]

template<typename VALUETYPE>
VALUETYPE adtf::base::ant::get_property ( const IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oDefaultValue )

Get the property content converted to the VALUETYPE.

Template Parameters
VALUETYPEThe type of the property
Parameters
oConfigurationThe configuratiion to look at
strNameOfValueThe name of the property
oDefaultValueThe default value if not found
Returns
VALUETYPE

◆ get_property() [2/2]

template<typename VALUETYPE>
VALUETYPE adtf::base::ant::get_property ( const IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oDefaultValue )

Get the property content converted to the VALUETYPE.

Template Parameters
VALUETYPEThe type of the property
Parameters
oConfigurationThe configuratiion to look at
strNameOfValueThe name of the property
oDefaultValueThe default value if not found
Returns
VALUETYPE

◆ get_property_object_by_path() [1/2]

tResult adtf::base::hollow::get_property_object_by_path ( const ant::IConfiguration & oConfiguration,
const char * strPropertyPathAndName,
ant::IProperty & oProperty )

Retrieves a property reference under the given oConfiguration by path.

Parameters
oConfigurationThe configuration
strPropertyPathAndNamethe path with '/' separator
oPropertyThe out property reference
Returns
tResult

◆ get_property_object_by_path() [2/2]

tResult adtf::base::hollow::get_property_object_by_path ( const ant::IConfiguration & oConfiguration,
const char * strPropertyPathAndName,
ant::IProperty & oProperty )

Retrieves a property reference under the given oConfiguration by path.

Parameters
oConfigurationThe configuration
strPropertyPathAndNamethe path with '/' separator
oPropertyThe out property reference
Returns
tResult

◆ handle_error()

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.

Parameters
[in]strErrorSourceThe name of the error source.
[in]strErrorCategoryThe name of the error category.
[in]eDefaultActionThe default action that should be taken if an error occurs.
[in]oErrorThe error result.

◆ is_equal()

tResult adtf::base::spider::is_equal ( const ant::IProperties & oLeftProperties,
const ant::IProperties & oRightProperties )

Check if two property sets are equal.

Parameters
[in]oLeftPropertiesThe operands for the check.
[in]oRightPropertiesThe operands for the check.
Returns
Standard result.

◆ nested_exceptions_to_string()

std::string A_UTILS_NS::detail::nested_exceptions_to_string ( const std::exception & error)
inline

Formats nested std::exceptions into a string, line by line

Parameters
[in]errorthe exception
Returns
The formatted string.

◆ runnable()

template<typename CALLABLE, typename... ARGS>
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.

Note
Usage:
// use of default activation type which is RUN_UNSPECIFIED:

◆ set_hash_value()

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.

Parameters
[in]oMapThe map to set the value to.
[in]oHashThe hash key of the value.
[in]oValuevalue to set.
Returns
standard error code
Return values
ERR_NOERRORvalue is set
ERR_INVALID_TYPEType is not supported. See IHashValueMapValue::tType

◆ set_property() [1/2]

template<typename VALUETYPE>
tResult adtf::base::ant::set_property ( IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oValue )

Set the property.

Template Parameters
VALUETYPEThe type of the property to set
Parameters
oConfigurationThe configuration to set at
strNameOfValueThe name of the property
oValueThe value of the property
Returns
tResult

◆ set_property() [2/2]

template<typename VALUETYPE>
tResult adtf::base::ant::set_property ( IConfiguration & oConfiguration,
const char * strNameOfValue,
VALUETYPE oValue )

Set the property.

Template Parameters
VALUETYPEThe type of the property to set
Parameters
oConfigurationThe configuration to set at
strNameOfValueThe name of the property
oValueThe value of the property
Returns
tResult

◆ split_parents_and_leaf()

std::pair< std::string, std::string > adtf::base::elasto::split_parents_and_leaf ( const char * strPropertyPathAndName)

Splits a property path into the parent path and the property name.

Parameters
[in]strPropertyPathAndNamePath separated by slashes.
Returns
parent path and property name.

◆ visit_properties()

void adtf::base::spider::visit_properties ( const ant::IProperties & oProperties,
const tPropertyVisitorCallback & fnCallback )

Utility function to visit all properties of a properties object

Parameters
[in]oPropertiesThe properties object.
[out]fnCallbackThis is called for each property.

◆ visit_sub_properties()

void adtf::base::spider::visit_sub_properties ( const ant::IProperty & oProperty,
const tPropertyVisitorCallback & fnCallback )

Utility function to visit all sub-properties of a given property

Parameters
[in]oPropertyThe property object.
[out]fnCallbackThis is called for each sub-property.