ATLAS Offline Software
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
ClassID_traits< T > Class Template Reference

Default, invalid implementation of ClassID_traits. More...

#include <ClassID_traits.h>

Collaboration diagram for ClassID_traits< T >:

Public Types

typedef std::is_base_of< DataObject, T > isDObj_t
 
typedef std::integral_constant< bool, s_isDataObjectis_DataObject_tag
 
typedef std::false_type has_version_tag
 
typedef std::false_type has_classID_tag
 

Static Public Member Functions

static const CLIDID ()
 the CLID of T More...
 
static const std::string & typeName ()
 the demangled type name of T More...
 
static const std::type_info & typeInfo ()
 the type id of T More...
 
static CLID ID ()
 Function returning a unique integer identifier for the selected type. More...
 
static const std::string & typeName ()
 Function returning a user-readable type name for the selected type. More...
 
static const std::type_info & typeId ()
 Function returning a type identifier for the selected type. More...
 

Static Public Attributes

static const bool s_isDataObject = isDObj_t::value
 flags whether T inherits from DataObject More...
 
static const int s_version = 0
 
static const bool s_isConst = false
 

Detailed Description

template<typename T>
class ClassID_traits< T >

Default, invalid implementation of ClassID_traits.

a traits class that associates a CLID to a type T It also detects whether T inherits from Gaudi DataObject

The CLASS_DEF macro specialises this class in order to provide functional descriptions of the EDM classes. This default class is non-functional on purpose, to generate compile-time errors in case some code tries using CLID information on a type that doesn't provide one.

Author
Tomasz Bold tomas.nosp@m.z.bo.nosp@m.ld@ce.nosp@m.rn.c.nosp@m.h
Revision
613558
Date
2014-08-26 19:16:16 +0200 (Tue, 26 Aug 2014)

Definition at line 40 of file Control/AthenaKernel/AthenaKernel/ClassID_traits.h.

Member Typedef Documentation

◆ has_classID_tag

template<typename T >
typedef std::false_type ClassID_traits< T >::has_classID_tag

◆ has_version_tag

template<typename T >
typedef std::false_type ClassID_traits< T >::has_version_tag

◆ is_DataObject_tag

template<typename T >
typedef std::integral_constant<bool, s_isDataObject> ClassID_traits< T >::is_DataObject_tag

◆ isDObj_t

template<typename T >
typedef std::is_base_of<DataObject, T> ClassID_traits< T >::isDObj_t

Member Function Documentation

◆ ID() [1/2]

template<typename T >
static const CLID& ClassID_traits< T >::ID ( )
inlinestatic

the CLID of T

Definition at line 50 of file Control/AthenaKernel/AthenaKernel/ClassID_traits.h.

50  {
52  return T::classID();
53  }

◆ ID() [2/2]

template<typename T >
static CLID ClassID_traits< T >::ID ( )
inlinestatic

Function returning a unique integer identifier for the selected type.

Definition at line 69 of file Event/xAOD/xAODCore/xAODCore/ClassID_traits.h.

◆ typeId()

template<typename T >
static const std::type_info& ClassID_traits< T >::typeId ( )
inlinestatic

Function returning a type identifier for the selected type.

Definition at line 77 of file Event/xAOD/xAODCore/xAODCore/ClassID_traits.h.

◆ typeInfo()

template<typename T >
static const std::type_info& ClassID_traits< T >::typeInfo ( )
inlinestatic

the type id of T

Definition at line 63 of file Control/AthenaKernel/AthenaKernel/ClassID_traits.h.

63  {
65  return typeid(T);
66  }

◆ typeName() [1/2]

template<typename T >
static const std::string& ClassID_traits< T >::typeName ( )
inlinestatic

the demangled type name of T

Definition at line 56 of file Control/AthenaKernel/AthenaKernel/ClassID_traits.h.

56  {
58  static const std::string tname = System::typeinfoName(typeid(T));
59  return tname;
60  }

◆ typeName() [2/2]

template<typename T >
static const std::string& ClassID_traits< T >::typeName ( )
inlinestatic

Function returning a user-readable type name for the selected type.

Definition at line 73 of file Event/xAOD/xAODCore/xAODCore/ClassID_traits.h.

Member Data Documentation

◆ s_isConst

template<typename T >
const bool ClassID_traits< T >::s_isConst = false
static

◆ s_isDataObject

template<typename T >
const bool ClassID_traits< T >::s_isDataObject = isDObj_t::value
static

flags whether T inherits from DataObject

Definition at line 44 of file Control/AthenaKernel/AthenaKernel/ClassID_traits.h.

◆ s_version

template<typename T >
const int ClassID_traits< T >::s_version = 0
static

The documentation for this class was generated from the following file:
ERROR_you_should_use_the_CLASS_DEF_macro_to_define_CLID_and_VERSION
Helper used in order to get the clear error message for the developer.
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:28
MY_STATIC_ASSERT
#define MY_STATIC_ASSERT(B)
internal use: issues a compilation error when condition B is false
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:32
ClassID_traits::s_isDataObject
static const bool s_isDataObject
flags whether T inherits from DataObject
Definition: Control/AthenaKernel/AthenaKernel/ClassID_traits.h:44
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35