ADTF  3.18.2
ddlversionhelper.h
Go to the documentation of this file.
1 
7 #ifndef _DDLVERSIONHELPER_H_INCLUDED_
8 #define _DDLVERSIONHELPER_H_INCLUDED_
9 
11 #define DDL_VERSION_COUNT 11
12 
13 namespace adtf_ddl
14 {
18  typedef enum {
34 
36  {
37  private:
38  static double m_saFloats[DDL_VERSION_COUNT];
39  static tDDLVersion m_saEnums[DDL_VERSION_COUNT];
40  static A_UTILS_NS::cString m_saStrings[DDL_VERSION_COUNT];
41  static A_UTILS_NS::cString m_sstrSupportedVersions;
42 
43  public:
51  static bool IsKnownVersionString(const A_UTILS_NS::cString& strVersion);
52 
60  static bool IsKnownVersionFloat(double fVersion);
61 
68  static double GetVersionEnumAsFloat(tDDLVersion eVersion);
69 
76  static double GetVersionStringAsFloat(const A_UTILS_NS::cString &strVersion);
77 
85 
92  static tDDLVersion GetVersionFloatAsEnum(double fVersion);
93 
100  static const A_UTILS_NS::cString& GetVersionFloatAsString(double fVersion);
101 
110 
111  static const double& GetDefaultVersion();
112 
113  static tResult CheckForSupportedVersion(A_UTILS_NS::cDOM& oDom);
114 
115  private:
131  template<class SearchType, class FindType, size_t nSize>
132  static const FindType& Find(const SearchType(&aSearch)[nSize], const FindType(&aFind)[nSize], const SearchType &oSearchItem, const FindType &oDefaultFindValue);
133  };
134 
135 
136 
137 } // namespace adtf_ddl
138 
139 #endif // _DDLVERSIONHELPER_H_INCLUDED_
cDOM implements a XML parser which can be used to read in XML files and perform simple (!...
static double GetVersionStringAsFloat(const A_UTILS_NS::cString &strVersion)
This function converts the DDL version and returns it.
static tDDLVersion GetVersionFloatAsEnum(double fVersion)
This function converts the DDL version and returns it.
static bool IsKnownVersionFloat(double fVersion)
This function checks a float if it contains a DDL version that is known to ADTF.
static const A_UTILS_NS::cString & GetKnownVersionsString()
This function returns a string of all DDL versions known to ADTF.
static const FindType & Find(const SearchType(&aSearch)[nSize], const FindType(&aFind)[nSize], const SearchType &oSearchItem, const FindType &oDefaultFindValue)
This method searches an item oSearchItem in an array aSearch and returns the item from aFind that is ...
static tDDLVersion GetVersionStringAsEnum(const A_UTILS_NS::cString &strVersion)
This function converts the DDL version and returns it.
static bool IsKnownVersionString(const A_UTILS_NS::cString &strVersion)
This function checks a string if it contains a DDL version that is known to ADTF.
static const A_UTILS_NS::cString & GetVersionFloatAsString(double fVersion)
This function converts the DDL version and returns it.
static double GetVersionEnumAsFloat(tDDLVersion eVersion)
This function converts the DDL version enum and returns it as float.
#define DDL_VERSION_COUNT
Max DDL Version Counter.
Namespace for the mainpage_pkg_ddl.
tDDLVersion
DDL Versions.
@ DDL_VERSION_LATEST
Latest version (Version 4.0.0)
@ DDL_VERSION_101
Version 1.0.1.
@ DDL_VERSION_100
Version 1.0.0.
@ DDL_VERSION_400
Version 4.0.0.
@ DDL_VERSION_200
Version 2.0.0.
@ DDL_VERSION_300
Version 3.0.0.
@ DDL_VERSION_102
Version 1.0.2.