ADTF
Loading...
Searching...
No Matches
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__)
Namespace for all functionality of the ADTF Base SDK provided since v3.0.
Definition adtf_class_version.h:16
Namespace for the ADTF Base SDK.
Definition adtf_base_type_traits.h:13
Namespace for all functionality provided by ADTF and its SDKs.
Definition adtf_client_connector.h:14
Definition adtf_class_version.h:43
static ucom::ant::iterator_adapter< const adtf::ucom::ant::tNamedVersion, adtf::ucom::ant::pointer_iterator > GetVersions()
Definition adtf_class_version.h:50
Definition adtf_class_version.h:21
static ucom::ant::iterator_adapter< const adtf::ucom::ant::tNamedVersion, adtf::ucom::ant::pointer_iterator > GetVersions()
Definition adtf_class_version.h:28
Adapter for begin and end iterators - usable as return and parameter value in interfaces.
Definition iterator_intf.h:190
Empty struct template to specialize implementations of iterator interfaces.
Definition iterator_intf.h:28
Named version information consisting of the modules name and its adtf_util::tVersion.
Definition class_info_intf.h:22