7 #ifndef _ADTF_UCOM_ANT_CLASS_DEPENDENCIES_INCLUDES_HEADER_
8 #define _ADTF_UCOM_ANT_CLASS_DEPENDENCIES_INCLUDES_HEADER_
12 #include <type_traits>
18 #ifndef ADTF_CLASS_DEPENDENCIES
20 #ifndef PROVIDE_INTERFACE
25 #define PROVIDE_INTERFACE(_interface) \
26 adtf::ucom::ant::tDependencyDescription { \
27 adtf::ucom::ant::tDependencyDescription::eDescriptionType::DT_PROVIDE, \
28 adtf::ucom::ant::get_iid<_interface>() }
31 #ifndef REQUIRE_INTERFACE
36 #define REQUIRE_INTERFACE(_interface) \
37 adtf::ucom::ant::tDependencyDescription{ \
38 adtf::ucom::ant::tDependencyDescription::eDescriptionType::DT_REQUIRE, \
39 adtf::ucom::ant::get_iid<_interface>() }
42 #ifndef REQUIRE_OPTIONAL_INTERFACE
47 #define REQUIRE_OPTIONAL_INTERFACE(_interface) \
48 adtf::ucom::ant::tDependencyDescription{ \
49 adtf::ucom::ant::tDependencyDescription::eDescriptionType::DT_REQUIRE_OPTIONAL, \
50 adtf::ucom::ant::get_iid<_interface>() }
61 #define ADTF_CLASS_DEPENDENCIES(...) \
65 template<class_type*> struct class_dependencies \
68 template<std::size_t ArrSize = \
69 std::tuple_size<decltype(std::make_tuple(__VA_ARGS__))>::value> \
70 static const std::array<adtf::ucom::tDependencyDescription, ArrSize>& get_dependencies()\
72 static const std::array<adtf::ucom::tDependencyDescription, ArrSize> arr = { \
94 template<
typename classT>
95 constexpr iterator_adapter<const tDependencyDescription, pointer_iterator>
99 typedef typename remove_const<typename remove_pointer<classT>::type>::type value_type;
100 static_assert(is_same<value_type, typename value_type::class_type>::value,
101 "get_class_dependencies<> failed. Check whether your interface correctly defined " \
104 return value_type::template class_info<(value_type*)
nullptr>::CDependencies();
111 template<
typename classT>
115 return get_class_dependencies<classT>();
122 template<
typename classT>
126 return get_class_dependencies<classT>();
constexpr iterator_adapter< const tDependencyDescription, pointer_iterator > get_class_dependencies()
Get the class dependencies (corresponding to the CID) of the Class type.
Namespace for entire ADTF SDK.
Adapter for begin and end iterators - usable as return and parameter value in interfaces.