00001 // Dear emacs, this is -*- c++ -*- 00002 // $Id: ClassID_traits.h 613558 2014-08-26 17:16:16Z krasznaa $ 00003 #ifndef XAODCORE_CLASSID_TRAITS_H 00004 #define XAODCORE_CLASSID_TRAITS_H 00005 00033 00034 // System include(s): 00035 extern "C" { 00036 # include <stdint.h> 00037 } 00038 #include <string> 00039 #include <typeinfo> 00040 00042 typedef uint32_t CLID; 00043 00045 template< class T > 00046 struct ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION {}; 00047 00060 template< class T > 00061 struct ClassID_traits { 00062 00064 static CLID ID() { 00065 return ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION< T >::please_correct; 00066 } 00068 static const std::string& typeName() { 00069 return ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION< T >::please_correct; 00070 } 00072 static const std::type_info& typeId() { 00073 return ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION< T >::please_correct; 00074 } 00075 00076 }; // struct ClassID_traits 00077 00078 #endif // not XAODCORE_CLASSID_TRAITS_H