ATLAS Offline Software
Public Types | Static Public Member Functions | Static Private Member Functions | List of all members
CLIDRegistry Class Reference

a static registry of CLID->typeName entries. NOT for general use. Use ClassIDSvc instead. More...

#include <CLIDRegistry.h>

Collaboration diagram for CLIDRegistry:

Public Types

typedef std::tuple< unsigned long, std::string, std::string > tuple_t
 
typedef std::vector< tuple_tCLIDVector_t
 

Static Public Member Functions

template<unsigned long CLID>
static bool addEntry (const std::type_info &ti, const char *typeName, const std::string &typeInfoName)
 to be called by the CLASS_DEFS More...
 
static bool hasNewEntries ()
 registry accessors (used by ClassIDSvc) More...
 
static CLIDVector_t newEntries ()
 returns an iterator range over the entries added since last time newEntries was called More...
 
static const std::type_info * CLIDToTypeinfo (CLID clid)
 Translate between CLID and type_info. More...
 
static CLID typeinfoToCLID (const std::type_info &ti)
 Return the CLID corresponding to a type_info. More...
 
static bool addEntry (unsigned long clid, const std::type_info &ti, const char *typeName, const std::string &typeInfoName)
 Out-of-line part of addEntry(). More...
 

Static Private Member Functions

static CLIDRegistryImplimpl ()
 

Detailed Description

a static registry of CLID->typeName entries. NOT for general use. Use ClassIDSvc instead.

Definition at line 35 of file CLIDRegistry.h.

Member Typedef Documentation

◆ CLIDVector_t

typedef std::vector< tuple_t > CLIDRegistry::CLIDVector_t

Definition at line 40 of file CLIDRegistry.h.

◆ tuple_t

typedef std::tuple<unsigned long, std::string, std::string> CLIDRegistry::tuple_t

Definition at line 39 of file CLIDRegistry.h.

Member Function Documentation

◆ addEntry() [1/2]

template<unsigned long CLID>
bool CLIDRegistry::addEntry ( const std::type_info &  ti,
const char *  typeName,
const std::string &  typeInfoName 
)
static

to be called by the CLASS_DEFS

Definition at line 74 of file CLIDRegistry.h.

76  {
77  static_assert (CLIDdetail::MINCLID <= CLID && CLID <= CLIDdetail::MAXCLID,
78  "CLID out of CLIDRegistry range");
79 
80  addEntry (CLID, ti, typeName, typeInfoName);
81  return true;
82 }

◆ addEntry() [2/2]

bool CLIDRegistry::addEntry ( unsigned long  clid,
const std::type_info &  ti,
const char *  typeName,
const std::string &  typeInfoName 
)
static

Out-of-line part of addEntry().

Definition at line 155 of file CLIDRegistry.cxx.

159 {
160  return impl().addEntry (clid, ti, typeName, typeInfoName);
161 }

◆ CLIDToTypeinfo()

const std::type_info * CLIDRegistry::CLIDToTypeinfo ( CLID  clid)
static

Translate between CLID and type_info.

Return the type_info corresponding to a CLID.

Parameters
clidThe CLID to find.

Returns the corresponding type_info or nullptr.

Definition at line 136 of file CLIDRegistry.cxx.

137 {
138  return impl().CLIDToTypeinfo (clid);
139 }

◆ hasNewEntries()

bool CLIDRegistry::hasNewEntries ( )
static

registry accessors (used by ClassIDSvc)

are there new entries since last call? Does not move the entries ptr

Definition at line 111 of file CLIDRegistry.cxx.

112 {
113  return impl().hasNewEntries();
114 }

◆ impl()

CLIDRegistryImpl & CLIDRegistry::impl ( )
staticprivate

Definition at line 123 of file CLIDRegistry.cxx.

124 {
126  return reg;
127 }

◆ newEntries()

CLIDRegistry::CLIDVector_t CLIDRegistry::newEntries ( )
static

returns an iterator range over the entries added since last time newEntries was called

Definition at line 117 of file CLIDRegistry.cxx.

118 {
119  return impl().newEntries();
120 }

◆ typeinfoToCLID()

CLID CLIDRegistry::typeinfoToCLID ( const std::type_info &  ti)
static

Return the CLID corresponding to a type_info.

Parameters
tiThe type_info to find.

Returns the corresponding CLID or CLID_NULL.

Definition at line 148 of file CLIDRegistry.cxx.

149 {
150  return impl().typeinfoToCLID (ti);
151 }

The documentation for this class was generated from the following files:
CLIDdetail::MINCLID
const unsigned long MINCLID
Definition: CLIDRegistry.h:24
CLIDRegistry::addEntry
static bool addEntry(const std::type_info &ti, const char *typeName, const std::string &typeInfoName)
to be called by the CLASS_DEFS
Definition: CLIDRegistry.h:74
CLIDRegistryImpl::typeinfoToCLID
CLID typeinfoToCLID(const std::type_info &ti) const
Return the CLID corresponding to a type_info.
Definition: CLIDRegistry.cxx:83
CLIDdetail::MAXCLID
const unsigned long MAXCLID
2**31 - 1
Definition: CLIDRegistry.h:25
CLIDRegistryImpl::newEntries
CLIDRegistry::CLIDVector_t newEntries()
Definition: CLIDRegistry.cxx:51
CLIDRegistryImpl::CLIDToTypeinfo
const std::type_info * CLIDToTypeinfo(CLID clid) const
Return the type_info corresponding to a CLID.
Definition: CLIDRegistry.cxx:66
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
CLIDRegistryImpl::addEntry
bool addEntry(unsigned long clid, const std::type_info &ti, const char *typeName, const std::string &typeInfoName)
Definition: CLIDRegistry.cxx:94
CLIDRegistryImpl::hasNewEntries
bool hasNewEntries() const
Definition: CLIDRegistry.cxx:43
CLIDRegistry::impl
static CLIDRegistryImpl & impl()
Definition: CLIDRegistry.cxx:123
CLIDRegistryImpl
Definition: CLIDRegistry.cxx:12
ReadCalibFromCool.typeName
typeName
Definition: ReadCalibFromCool.py:477
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211