ADTF  3.18.2
cDDLVersionHelper

Static Public Member Functions

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. More...
 
static bool IsKnownVersionFloat (double fVersion)
 This function checks a float if it contains a DDL version that is known to ADTF. More...
 
static double GetVersionEnumAsFloat (tDDLVersion eVersion)
 This function converts the DDL version enum and returns it as float. More...
 
static double GetVersionStringAsFloat (const A_UTILS_NS::cString &strVersion)
 This function converts the DDL version and returns it. More...
 
static tDDLVersion GetVersionStringAsEnum (const A_UTILS_NS::cString &strVersion)
 This function converts the DDL version and returns it. More...
 
static tDDLVersion GetVersionFloatAsEnum (double fVersion)
 This function converts the DDL version and returns it. More...
 
static const A_UTILS_NS::cStringGetVersionFloatAsString (double fVersion)
 This function converts the DDL version and returns it. More...
 
static const A_UTILS_NS::cStringGetKnownVersionsString ()
 This function returns a string of all DDL versions known to ADTF. More...
 
static const double & GetDefaultVersion ()
 
static tResult CheckForSupportedVersion (A_UTILS_NS::cDOM &oDom)
 

Static Private Member Functions

template<class SearchType , class FindType , size_t nSize>
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 at the same index as oSearchItem in aSearch. More...
 

Static Private Attributes

static double m_saFloats [DDL_VERSION_COUNT]
 
static tDDLVersion m_saEnums [DDL_VERSION_COUNT]
 
static A_UTILS_NS::cString m_saStrings [DDL_VERSION_COUNT]
 
static A_UTILS_NS::cString m_sstrSupportedVersions
 

Detailed Description

Definition at line 35 of file ddlversionhelper.h.

Member Function Documentation

◆ Find()

static const FindType& Find ( const SearchType(&)  aSearch[nSize],
const FindType(&)  aFind[nSize],
const SearchType &  oSearchItem,
const FindType &  oDefaultFindValue 
)
staticprivate

This method searches an item oSearchItem in an array aSearch and returns the item from aFind that is at the same index as oSearchItem in aSearch.

The arrays aSearch and aFind have to be static arrays of the same size.

Parameters
[in]aSearchThe Array to be used for the search.
[in]aFindThe Array to return the value from.
[in]oSearchItemThe item to be found in aFind.
[in]oDefaultFindValueIf oSearchItem cannot be found, the function returns this value.
Returns
The item in aFind that is at the same index as oSearchItem in aSearch, oSearchItem if nothing can be found.

◆ GetKnownVersionsString()

static const A_UTILS_NS::cString& GetKnownVersionsString ( )
static

This function returns a string of all DDL versions known to ADTF.

This string can be used for error messages regarding supported versions. It will look like "<v1>, <2>, <...> and <vn>" while the "<vx>" parts are replaced with actual versions and "<vn>" is the latest version.

Returns
The string with all known versions.

◆ GetVersionEnumAsFloat()

static double GetVersionEnumAsFloat ( tDDLVersion  eVersion)
static

This function converts the DDL version enum and returns it as float.

Parameters
[in]eVersionThe version to be converted.
Returns
The version, -1 if version is unknown.

◆ GetVersionFloatAsEnum()

static tDDLVersion GetVersionFloatAsEnum ( double  fVersion)
static

This function converts the DDL version and returns it.

Parameters
[in]fVersionThe version to be converted.
Returns
The version, -1 if version is unknown to ADTF.

◆ GetVersionFloatAsString()

static const A_UTILS_NS::cString& GetVersionFloatAsString ( double  fVersion)
static

This function converts the DDL version and returns it.

Parameters
[in]fVersionThe version to be converted.
Returns
The version, an empty string if version is unknown to ADTF.

◆ GetVersionStringAsEnum()

static tDDLVersion GetVersionStringAsEnum ( const A_UTILS_NS::cString strVersion)
static

This function converts the DDL version and returns it.

Parameters
[in]strVersionThe version to be converted.
Returns
The version, -1 if version is unknown to ADTF.

◆ GetVersionStringAsFloat()

static double GetVersionStringAsFloat ( const A_UTILS_NS::cString strVersion)
static

This function converts the DDL version and returns it.

Parameters
[in]strVersionThe version to be converted.
Returns
The version, -1 if version is unknown to ADTF.

◆ IsKnownVersionFloat()

static bool IsKnownVersionFloat ( double  fVersion)
static

This function checks a float if it contains a DDL version that is known to ADTF.

Parameters
[in]fVersionThe float to be analyzed.
Returns
True if the version is known, false otherwise.

◆ IsKnownVersionString()

static bool IsKnownVersionString ( const A_UTILS_NS::cString strVersion)
static

This function checks a string if it contains a DDL version that is known to ADTF.

Parameters
[in]strVersionThe string to be analyzed.
Returns
True if the version is known, false otherwise.