ADTF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
adtf_class_version.h
Go to the documentation of this file.
1
7#pragma once
9#include <adtfbase/adtf_base_version.h>
10
11namespace adtf
12{
13namespace base
14{
15namespace ant
16{
21{
29 {
30 using tNamedVersion = adtf::ucom::ant::tNamedVersion;
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
41template <typename CUSTOMER_VERSION>
43{
51 {
52 using tNamedVersion = adtf::ucom::ant::tNamedVersion;
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
61using ant::adtf_version_default;
62using ant::adtf_version_customer;
63}
64}
65
73#define ADTF_ADDITONAL_VERSION_TYPE(_ID, _MAJOR, _MINOR, _PATCH)\
74struct 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.
Namespace for all functionality of the ADTF Base SDK provided since v3.0.
Namespace for the ADTF Base SDK.
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)
Empty struct template to specialize implementations of iterator interfaces.
Named version information consisting of the modules name and its adtf_util::tVersion.