ATLAS Offline Software
Loading...
Searching...
No Matches
CLIDRegistry Class Reference

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

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}
uint32_t CLID
The Class ID type.
static bool addEntry(const std::type_info &ti, const char *typeName, const std::string &typeInfoName)
to be called by the CLASS_DEFS
const unsigned long MINCLID
const unsigned long MAXCLID
2**31 - 1

◆ 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}
bool addEntry(unsigned long clid, const std::type_info &ti, const char *typeName, const std::string &typeInfoName)
static CLIDRegistryImpl & impl()

◆ 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}
const std::type_info * CLIDToTypeinfo(CLID clid) const
Return the type_info corresponding to a CLID.

◆ 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}
bool hasNewEntries() const

◆ impl()

CLIDRegistryImpl & CLIDRegistry::impl ( )
staticprivate

Definition at line 123 of file CLIDRegistry.cxx.

124{
125 static CLIDRegistryImpl reg ATLAS_THREAD_SAFE;
126 return reg;
127}
#define ATLAS_THREAD_SAFE

◆ 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}
CLIDRegistry::CLIDVector_t newEntries()

◆ 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}
CLID typeinfoToCLID(const std::type_info &ti) const
Return the CLID corresponding to a type_info.

The documentation for this class was generated from the following files: