|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ATHENAKERNEL_CLASSID_TRAITS_H
6 #define ATHENAKERNEL_CLASSID_TRAITS_H
17 #include "GaudiKernel/ClassID.h"
18 #include "GaudiKernel/DataObject.h"
19 #include "GaudiKernel/System.h"
24 #include <type_traits>
32 #define MY_STATIC_ASSERT( B ) \
33 static_assert (B, "You should use the CLASS_DEF macro to define CLID and VERSION");
42 typedef std::is_base_of<DataObject, T>
isDObj_t;
58 static const std::string tname = System::typeinfoName(
typeid(
T));
77 #undef MY_STATIC_ASSERT
79 #endif // not ATHENAKERNEL_CLASSID_TRAITS_H
static const bool s_isConst
Helper used in order to get the clear error message for the developer.
static const int s_version
static const CLID & ID()
the CLID of T
static const std::string & typeName()
the demangled type name of T
An interface for getting the name of a class as a string.
std::integral_constant< bool, s_isDataObject > is_DataObject_tag
std::false_type has_classID_tag
Default, invalid implementation of ClassID_traits.
std::false_type has_version_tag
uint32_t CLID
The Class ID type.
#define MY_STATIC_ASSERT(B)
internal use: issues a compilation error when condition B is false
std::is_base_of< DataObject, T > isDObj_t
static const bool s_isDataObject
flags whether T inherits from DataObject
a static registry of CLID->typeName entries. NOT for general use. Use ClassIDSvc instead.
static const std::type_info & typeInfo()
the type id of T