ADTF
adtf_class_version.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include <adtfucom3/adtf_ucom3.h>
9 #include <adtfbase/adtf_base_version.h>
10 
11 namespace adtf
12 {
13 namespace base
14 {
15 namespace ant
16 {
21 {
29  {
31  static const std::array<const tNamedVersion, 2> sVersions{{{ADTF_VERSION_ID, adtf::base::get_adtf_version_information()}, {UCOM_VERSION_ID, adtf::ucom::get_ucom_version_information()}}};
32  return ucom::ant::iterator_adapter<const tNamedVersion, ucom::ant::pointer_iterator>::create(&*sVersions.begin(), &*sVersions.begin() + sVersions.size());
33  }
34 };
35 
41 template <typename CUSTOMER_VERSION>
43 {
51  {
53  static const std::array<const tNamedVersion, 3> sVersions{ { { CUSTOMER_VERSION::GetCustomerVersion() },
54  { ADTF_VERSION_ID, adtf::base::get_adtf_version_information() },
55  { UCOM_VERSION_ID, adtf::ucom::get_ucom_version_information() } } };
56  return ucom::ant::iterator_adapter<const tNamedVersion, ucom::ant::pointer_iterator>::create(&*sVersions.begin(), &*sVersions.begin() + sVersions.size());
57  }
58 };
59 }
60 
61 using ant::adtf_version_default;
62 using ant::adtf_version_customer;
63 }
64 }
65 
73 #define ADTF_ADDITONAL_VERSION_TYPE(_ID, _MAJOR, _MINOR, _PATCH)\
74 struct custom_version_##_ID {\
75  static adtf::ucom::ant::tNamedVersion GetCustomerVersion()\
76  {\
77  static const adtf::ucom::ant::tNamedVersion sVersion{"adtf::"#_ID, {_MAJOR, _MINOR, _PATCH, 0}};\
78  return sVersion;\
79  }\
80 }
81 
86 #define ADTF_CLASS_VERSIONS(...) \
87  UCOM_CLASS_VERSIONS(adtf::ucom::add_version(ADTF_VERSION_ID, ADTF_VERSION_MAJOR, ADTF_VERSION_MINOR, ADTF_VERSION_PATCH), \
88  __VA_ARGS__)
Copyright © Audi Electronics Venture GmbH.
ant::tNamedVersion tNamedVersion
Alias alwas bringing the latest version of ant::tNamedVersion into scope.
Namespace for entire ADTF SDK.
Static Version type for the ADTF Versions which is enriched with a customer version.
static ucom::ant::iterator_adapter< const adtf::ucom::ant::tNamedVersion, adtf::ucom::ant::pointer_iterator > GetVersions()
Will return a static array to iterate the ADTF Version + the customer version.
Static Version type for the ADTF Versions.
static ucom::ant::iterator_adapter< const adtf::ucom::ant::tNamedVersion, adtf::ucom::ant::pointer_iterator > GetVersions()
Will return a static array to iterate the ADTF Version.
Adapter for begin and end iterators - usable as return and parameter value in interfaces.
static self_type create(IteratorInterfaceType &o_oIterator)
Create the adapter by assigning iterator interface to begin and end iterators.
Empty struct template to specialize implementations of iterator interfaces.
Definition: iterator_intf.h:28