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

Go to the source code of this file.

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

Functions

template<typename classT>
constexpr iterator_adapter< const tDependencyDescription, pointer_iteratoradtf::ucom::ant::get_class_dependencies ()
 
template<typename classT>
constexpr iterator_adapter< const tDependencyDescription, pointer_iteratoradtf::ucom::ant::get_class_dependencies (const classT &)
 
template<typename classT>
constexpr iterator_adapter< const tDependencyDescription, pointer_iteratoradtf::ucom::ant::get_class_dependencies (const classT *)
 
template<typename classT>
constexpr iterator_adapter< const tDependencyDescription, pointer_iteratoradtf::ucom::get_class_dependencies ()
 Alias always bringing the latest version of ant::get_class_dependencies into scope.
 

Detailed Description

Copyright © Audi Electronics Venture GmbH. All rights reserved

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.

◆ PROVIDE_INTERFACE

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

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

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

◆ REQUIRE_INTERFACE

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

Macro usable with ADTF_CLASS_DEPENDENCIES() to require mandatory interfaces.

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

◆ 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.
Definition class_info_intf.h:37

Macro usable with ADTF_CLASS_DEPENDENCIES() to require optional interfaces.

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