ADTF  3.18.2
class_dependencies.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

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 PROVIDE_INTERFACE(_interface)
 Macro usable with ADTF_CLASS_DEPENDENCIES() to provide interfaces by defining class. More...
 
#define REQUIRE_INTERFACE(_interface)
 Macro usable with ADTF_CLASS_DEPENDENCIES() to require mandatory interfaces. More...
 
#define REQUIRE_OPTIONAL_INTERFACE(_interface)
 Macro usable with ADTF_CLASS_DEPENDENCIES() to require optional interfaces. More...
 
#define ADTF_CLASS_DEPENDENCIES(...)
 Add interface ids (string literals,. More...
 

Functions

template<typename classT >
constexpr iterator_adapter< const tDependencyDescription, pointer_iterator > get_class_dependencies ()
 Get the class dependencies (corresponding to the CID) of the Class type. More...
 
template<typename classT >
constexpr iterator_adapter< const tDependencyDescription, pointer_iterator > get_class_dependencies (const classT &)
 Convenience function usable with a reference to an object of type class. More...
 
template<typename classT >
constexpr iterator_adapter< const tDependencyDescription, pointer_iterator > get_class_dependencies (const classT *)
 Convenience function usable with a reference to an object of type class. More...
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file class_dependencies.h.

Macro Definition Documentation

◆ ADTF_CLASS_DEPENDENCIES

#define ADTF_CLASS_DEPENDENCIES (   ...)
Value:
/* the parameter is only used for compile time check with @c has_class_dependencies_type */ \
/* without this neat trick, the compile time check would also succeed if any base class */ \
/* defines the static method. Note: \c class_type is declared in ADTF_CLASS_ID_NAME() ! */ \
template<class_type*> struct class_dependencies \
{ /* number of args needed for array during compile time - how this is done: */ \
/* https://tinyurl.com/zhd3kly */ \
template<std::size_t ArrSize = \
std::tuple_size<decltype(std::make_tuple(__VA_ARGS__))>::value> \
static const std::array<adtf::ucom::tDependencyDescription, ArrSize>& get_dependencies()\
{ \
static const std::array<adtf::ucom::tDependencyDescription, ArrSize> arr = { \
__VA_ARGS__ }; \
return arr; \
} \
}

Add interface ids (string literals,.

See also
ADTF_IID()) which the defining class depends on

The parameters must be of type adtf::ucom::tDependencyDescription and must identify valid interfaces which are known to the runtime during instantiation of the defining class. The interfaces passed to this macro will be part of the classes description inside the generated plugin description file.

Note
See PROVIDE_INTERFACE(), REQUIRE_INTERFACE() and REQUIRE_OPTIONAL_INTERFACE() for helper macros.

Definition at line 61 of file class_dependencies.h.

◆ PROVIDE_INTERFACE

#define PROVIDE_INTERFACE (   _interface)
Value:
adtf::ucom::ant::get_iid<_interface>() }
Dependency description usable for ADTF_CLASS_DEPENDENCIES()
@ DT_PROVIDE
The given interface describes a mandatory provided dependency.

Macro usable with ADTF_CLASS_DEPENDENCIES() to provide interfaces by defining class.

Parameters
[in]_interfaceThe interface type being provided by declaring class

Definition at line 25 of file class_dependencies.h.

◆ REQUIRE_INTERFACE

#define REQUIRE_INTERFACE (   _interface)
Value:
adtf::ucom::ant::get_iid<_interface>() }
@ DT_REQUIRE
The given interface describes a mandatory required dependency.

Macro usable with ADTF_CLASS_DEPENDENCIES() to require mandatory interfaces.

Parameters
[in]_interfaceThe interface type being required by declaring class

Definition at line 36 of file class_dependencies.h.

◆ REQUIRE_OPTIONAL_INTERFACE

#define REQUIRE_OPTIONAL_INTERFACE (   _interface)
Value:
adtf::ucom::ant::get_iid<_interface>() }
@ DT_REQUIRE_OPTIONAL
The given interface describes an optional required dependency.

Macro usable with ADTF_CLASS_DEPENDENCIES() to require optional interfaces.

Parameters
[in]_interfaceThe interface type being required by declaring class

Definition at line 47 of file class_dependencies.h.