ADTF  3.18.2
class_id.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

Namespaces

 adtf
 Namespace for entire ADTF SDK.
 
 adtf::ucom
 Namespace for the ADTF uCOM3 SDK.
 
 adtf::ucom::ant
 Namespace for all functionality provided since v3.0.
 

Macros

#define ADTF_CLASS_ID_NAME(_class, _strcid, _strclabel)
 Common macro to enable correct treatment of class identifier AND Class Name by IClassInfo. More...
 
#define ADTF_CLASS_INFO_IMPL(_class)
 Common macro to implement correct treatment of adtf::ucom::ant::IClassInfo. More...
 
#define ADTF_CLASS_ID(_class, _strcid)   ADTF_CLASS_ID_NAME(_class, _strcid, nullptr)
 ADTF_CLASS_INFO_IMPL. More...
 

Functions

template<typename classT >
constexpr const char * get_class_id ()
 Get the class id (CID) of the Class type. More...
 
template<typename classT >
constexpr const char * get_class_id (const classT &)
 Convenience function usable with a reference to an object of type classT. More...
 
template<typename classT >
constexpr const char * get_class_id (const classT *)
 Convenience function usable with a pointer to an object of type classT. More...
 
template<typename classT >
constexpr const char * get_class_label ()
 Get the class label (corresponding to the CID) of the Class type (a readable name !) More...
 
template<typename classT >
constexpr const char * get_class_label (const classT &)
 Convenience function usable with a reference to an object of type class. More...
 
template<typename classT >
constexpr const char * get_class_label (const classT *)
 Convenience function usable with a pointer to an object of type class. More...
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file class_id.h.

Macro Definition Documentation

◆ ADTF_CLASS_ID

#define ADTF_CLASS_ID (   _class,
  _strcid 
)    ADTF_CLASS_ID_NAME(_class, _strcid, nullptr)

ADTF_CLASS_INFO_IMPL.

Common macro to enable correct treatment of class identifier by IClassInfo.

Parameters
[in]_className of the class (decltype of _class)
[in]_strcidClass IDentifier the containing type is identified with
Remarks
Put this into public scope of your class definiton. It will define your class identifier as well as the implementation of IClassInfo::GetCID.
See also
Class IDs and Object IDs

Definition at line 91 of file class_id.h.

◆ ADTF_CLASS_ID_NAME

#define ADTF_CLASS_ID_NAME (   _class,
  _strcid,
  _strclabel 
)
Value:
typedef _class class_type; \
template<_class*> struct class_info : \
{ \
static const char* CID() { return _strcid; } \
static const char* CLabel() { return _strclabel ? _strclabel : CID();} \
}

Common macro to enable correct treatment of class identifier AND Class Name by IClassInfo.

Parameters
[in]_className of the class (decltype of _class)
[in]_strcidClass IDentifier the containing type is identified with
[in]_strclabelClass IDentifier. A readable name corresponding to given _strcid
Remarks
Put this into public scope of your class definiton. It will define your class identifier as well as the implementation of IClassInfo::GetCID. (see also IClassInfo::GetCLabel)
See also
page_ucom_object_id_and_class_id

Definition at line 33 of file class_id.h.

◆ ADTF_CLASS_INFO_IMPL

#define ADTF_CLASS_INFO_IMPL (   _class)
Value:
const char* GetCID() const override \
{ \
return adtf::ucom::get_class_id<_class>(); \
} \
const char* GetCLabel() const override \
{ \
return adtf::ucom::get_class_label<_class>(); \
} \
GetCDependencies() const override \
{ \
return adtf::ucom::get_class_dependencies<_class>(); \
} \
GetCVersions() const override \
{ \
return adtf::ucom::get_class_versions<_class>(); \
}
ant::tDependencyDescription tDependencyDescription
Alias alwas bringing the latest version of ant::tDependencyDescription into scope.
ant::iterator_adapter< T, IteratorType > iterator_adapter
Alias always bringing the latest version of ant::iterator_adapter into scope.
ant::pointer_iterator< T > pointer_iterator
Alias always bringing the latest version of ant::pointer_iterator into scope.
ant::tNamedVersion tNamedVersion
Alias alwas bringing the latest version of ant::tNamedVersion into scope.

Common macro to implement correct treatment of adtf::ucom::ant::IClassInfo.

Parameters
[in]_className of the class (decltype of _class)
Remarks
Put this into public scope of your class definiton. It will define your class identifier as well as the implementation of IClassInfo::GetCID. (see also IClassInfo::GetCLabel)
See also
page_ucom_object_id_and_class_id

Definition at line 57 of file class_id.h.