ADTF
Loading...
Searching...
No Matches
adtf_iid.h File Reference
#include <a_utils/core/result.h>
#include <tuple>
#include <type_traits>
Include dependency graph for adtf_iid.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  adtf::ucom::ant::interface_expose< Interfaces >
 
struct  adtf::ucom::ant::inherit_from<... >
 Meta struct template evaluated at compile time when compiling default_object. More...
 
struct  adtf::ucom::ant::expose_interfaces<... >
 Meta struct template evaluated at compile time when compiling default_object. More...
 
class  adtf::ucom::ant::default_object< inherit_from< Parents... >, expose_interfaces< Interfaces... >, Child >
 Used to implement IObject::GetInterface() methods with given interfaces to expose. More...
 
class  adtf::ucom::ant::extend_object< BASE_OBJECT, EXTEND_INTERFACE, Child >
 Used to implement IObject::GetInterface() methods with given interfaces to expose. More...
 

Namespaces

namespace  adtf
 Namespace for all functionality provided by ADTF and its SDKs.
 
namespace  adtf::ucom
 Namespace for the ADTF uCOM SDK.
 
namespace  adtf::ucom::ant
 Namespace for all functionality of the ADTF UCOM SDK provided since v3.0.
 

Macros

#define ADTF_IID(_interface, _striid)
 
#define UCOM_RESOLVE(...)
 Resolve a path to a base class which is inherited multiple times.
 

Typedefs

template<typename... Interfaces>
using adtf::ucom::interface_expose = ant::interface_expose<Interfaces...>
 Alias bringing the latest version of meta struct template ant::interface_expose into scope.
 
template<typename... ParentTypes>
using adtf::ucom::inherit_from = ant::inherit_from<ParentTypes...>
 Alias bringing the latest version of meta struct template ant::inherit_from into scope.
 
template<typename... InterfaceTypes>
using adtf::ucom::expose_interfaces = ant::expose_interfaces<InterfaceTypes...>
 Alias bringing the latest version of meta struct template ant::expose_interfaces into scope.
 
template<typename... Types>
using adtf::ucom::default_object = ant::default_object<Types...>
 Alias bringing the latest version of meta struct template ant::default_object into scope.
 
template<typename BASE_CLASS, typename EXTEND_INTERFACE, typename Child>
using adtf::ucom::extend_object = ant::extend_object<BASE_CLASS, EXTEND_INTERFACE, Child>
 Alias bringing the latest version of meta struct template ant::extend_object into scope.
 

Functions

template<typename Interface>
constexpr const char * adtf::ucom::ant::get_iid () noexcept
 
template<typename Interface>
constexpr const char * adtf::ucom::ant::get_iid (const Interface &) noexcept
 
template<typename Interface>
constexpr const char * adtf::ucom::ant::get_iid (const Interface *) noexcept
 
template<typename Interface>
constexpr const char * adtf::ucom::get_iid () noexcept
 Alias bringing the latest version of ant::get_iid() into scope.
 

Detailed Description

Copyright © Audi Electronics Venture GmbH. All rights reserved

Macro Definition Documentation

◆ ADTF_IID

#define ADTF_IID ( _interface,
_striid )
Value:
typedef _interface interface_type; \
template<_interface*> \
struct interface_info \
{ \
static constexpr const char* IID() noexcept \
{ \
return _striid; \
} \
}

Common macro to enable correct treatment of interface classes by the adtf::ucom::ucom_cast<>

Parameters
[in]_interfaceName of the interface class ADTF_IID() is implemented in.
[in]_striidInterface IDentifier the containing type is identified with

◆ UCOM_RESOLVE

#define UCOM_RESOLVE ( ...)
Value:
typedef std::tuple<__VA_ARGS__> hierarchy_type;

Resolve a path to a base class which is inherited multiple times.

In a multiple inheritance we might end up with one base class inherited multiple times. To address the possible resulting ambiguous instantiations, we tell the compiler which "way" to use when casting up to such a base class. The "way" is called a hierarchy which is given with macro UCOM_RESOLVE(). Inside this macro the base class is given together with a so called intermediate type informing the compiler which type to use when upcasting to a base type that is inherited multiple times. This macro takes an arbitrary number of arguments. The arguments must be given as key-value-pairs, meaning every key being the interface that needs to be resolved and every value being the intermediate type to use. The key-value-pairs might either be given directly or as types of typedefd std::pair<>