ADTF  3.18.2
adtf_iid.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

Classes

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

Namespaces

 adtf
 Namespace for entire ADTF SDK.
 
 adtf::ucom
 Namespace for the ADTF uCOM3 SDK.
 
 adtf::ucom::ant
 Namespace for all functionality provided since v3.0.
 

Macros

#define ADTF_IID(_interface, _striid)
 Common macro to enable correct treatment of interface classes by the adtf::ucom::ucom_cast<> More...
 
#define UCOM_RESOLVE(...)   typedef std::tuple < __VA_ARGS__ > hierarchy_type;
 Resolve a path to a base class which is inherited multiple times. More...
 

Typedefs

template<typename ... Interfaces>
using interface_expose = ant::interface_expose< Interfaces... >
 Alias bringing the latest version of meta struct template ant::interface_expose into scope.
 
template<typename ... ParentTypes>
using inherit_from = ant::inherit_from< ParentTypes... >
 Alias bringing the latest version of meta struct template ant::inherit_from into scope.
 
template<typename ... InterfaceTypes>
using expose_interfaces = ant::expose_interfaces< InterfaceTypes... >
 Alias bringing the latest version of meta struct template ant::expose_interfaces into scope.
 
template<typename ... Types>
using 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 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 >
const char * get_iid ()
 Get the interface id (IID) of the Interface type. More...
 
template<typename Interface >
const char * get_iid (const Interface &)
 Convenience function usable with a reference to an object of type interface. More...
 
template<typename Interface >
const char * get_iid (const Interface *)
 Convenience function usable with a pointer to an object of type interface. More...
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file adtf_iid.h.

Macro Definition Documentation

◆ ADTF_IID

#define ADTF_IID (   _interface,
  _striid 
)
Value:
typedef _interface interface_type; \
template<_interface*> struct interface_info \
{ \
static const char* IID() { 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

Definition at line 17 of file adtf_iid.h.

◆ UCOM_RESOLVE

#define UCOM_RESOLVE (   ...)    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<>

Definition at line 40 of file adtf_iid.h.