The Gaudi Framework
v30r3 (a5ef0a68)
|
Definition of an entry in the transient data store. More...
#include <GaudiKernel/RegistryEntry.h>
Public Types | |
typedef Store::const_iterator | Iterator |
Iterator definition. More... | |
Public Types inherited from IRegistry | |
typedef std::string | name_type |
Type definitions Name type. More... | |
typedef std::string | id_type |
Identifier Key type. More... | |
Public Member Functions | |
RegistryEntry (std::string path, RegistryEntry *parent=nullptr) | |
Standard Constructor. More... | |
~RegistryEntry () override | |
Standard Destructor. More... | |
unsigned long | release () override |
IInterface implementation: Reference the object. More... | |
unsigned long | addRef () override |
IInterface implementation: Dereference the object. More... | |
const std::string & | name () const override |
Retrieve name of the entry. More... | |
const std::string & | identifier () const override |
Full identifier (or key) More... | |
IDataProviderSvc * | dataSvc () const override |
Retrieve pointer to Transient Store. More... | |
DataObject * | object () const override |
Retrive object behind the link. More... | |
IOpaqueAddress * | address () const override |
Retrieve opaque storage address. More... | |
IRegistry * | parent () const |
Pointer to parent directory entry. More... | |
bool | isSoft () const |
Is the link soft or hard. More... | |
const Store & | leaves () const |
Access the leaves of the object. More... | |
int | size () const |
Return the size of the container(=number of objects) More... | |
bool | isEmpty () const |
Simple check if the Container is empty. More... | |
Iterator | begin () const |
Return starting point for container iteration. More... | |
Iterator | end () const |
Return end elemtn if the container. More... | |
IRegistry * | find (const IRegistry *obj) const |
Try to find an object identified by its pointer. More... | |
IRegistry * | find (boost::string_ref path) const |
Try to find an object identified by its relative name to the directory. More... | |
void | setAddress (IOpaqueAddress *pAddress) override |
Set/Update Opaque address. More... | |
void | setObject (DataObject *obj) |
Set/Update object address. More... | |
StatusCode | add (std::string name, DataObject *pObject, bool is_soft=false) |
Add entry to data store. More... | |
StatusCode | add (std::string name, IOpaqueAddress *pAddress, bool is_soft=false) |
Add entry to data store. More... | |
StatusCode | remove (boost::string_ref name) |
Remove an entry from the store. More... | |
long | add (IRegistry *obj) |
Add object to the container. More... | |
long | remove (IRegistry *obj) |
Remove an object from the container. More... | |
long | deleteElements () |
Delete all contained elements. More... | |
StatusCode | traverseTree (IDataStoreAgent *pAgent, int level=0) |
traverse data tree More... | |
Public Member Functions inherited from IRegistry | |
virtual | ~IRegistry ()=default |
destructor More... | |
Private Types | |
typedef std::vector< IRegistry * > | Store |
Definition of datastore type. More... | |
Private Member Functions | |
void | assemblePath (std::string &buffer) const |
The following entries serve two aspects: 1) They are faster for recursive calls, because they are non-virtual 2) They can be re-used for the non-const entry points using a const_cast of the result. More... | |
IRegistry * | i_find (const IRegistry *pDirectory) const |
Internal method to retrieve data directory. More... | |
RegistryEntry * | i_find (boost::string_ref path) const |
Internal method to retrieve data directory. More... | |
RegistryEntry * | i_find (const DataObject *pObject) const |
Internal method to locate object entry. More... | |
RegistryEntry * | i_create (std::string name) |
Internal method to create entries. More... | |
long | i_add (RegistryEntry *entry) |
Internal method to add entries. More... | |
void | setParent (RegistryEntry *pParent) |
Set new parent pointer. More... | |
void | setDataSvc (IDataProviderSvc *s) |
Set the transient data store. More... | |
RegistryEntry * | parentEntry () |
Pointer to parent registry entry. More... | |
RegistryEntry * | findLeaf (boost::string_ref path) const |
Find identified leaf in this registry node. More... | |
RegistryEntry * | findLeaf (const DataObject *key) const |
Find identified leaf in this registry node. More... | |
void | makeHard (DataObject *pObject) |
Initialize link as hard link. More... | |
void | makeHard (IOpaqueAddress *pAddress) |
Initialize link as hard link. More... | |
void | makeSoft (DataObject *pObject) |
Initialize link as soft link. More... | |
void | makeSoft (IOpaqueAddress *pAddress) |
Initialize link as soft link. More... | |
Private Attributes | |
unsigned long | m_refCount = 0 |
Reference counter. More... | |
bool | m_isSoft = false |
Is the link soft or hard? More... | |
std::string | m_fullpath |
String containing full path of the object (volatile) More... | |
std::string | m_path |
Path name. More... | |
RegistryEntry * | m_pParent = nullptr |
Pointer to parent. More... | |
IOpaqueAddress * | m_pAddress = nullptr |
Pointer to opaque address (load info) More... | |
DataObject * | m_pObject = nullptr |
Pointer to object. More... | |
IDataProviderSvc * | m_pDataProviderSvc = nullptr |
Pointer to hosting transient store. More... | |
Store | m_store |
Store of leaves. More... | |
Friends | |
class | ::DataSvc |
class | ::TsDataSvc |
Definition of an entry in the transient data store.
The RegistryEntry represents an entry of the transient data store. The object holds the recipe how to retrieve objects from the persistent world (member IOpaqueAddress) as well as the backward link to the parent entry and the leaves.
Definition at line 37 of file RegistryEntry.h.
typedef Store::const_iterator DataSvcHelpers::RegistryEntry::Iterator |
Iterator definition.
Definition at line 48 of file RegistryEntry.h.
|
private |
Definition of datastore type.
Definition at line 41 of file RegistryEntry.h.
DataSvcHelpers::RegistryEntry::RegistryEntry | ( | std::string | path, |
RegistryEntry * | parent = nullptr |
||
) |
Standard Constructor.
Definition at line 43 of file RegistryEntry.cpp.
|
override |
Standard Destructor.
Standard destructor.
Definition at line 54 of file RegistryEntry.cpp.
StatusCode DataSvcHelpers::RegistryEntry::add | ( | std::string | name, |
DataObject * | pObject, | ||
bool | is_soft = false |
||
) |
Add entry to data store.
Add entry to the current data store item.
Definition at line 207 of file RegistryEntry.cpp.
StatusCode DataSvcHelpers::RegistryEntry::add | ( | std::string | name, |
IOpaqueAddress * | pAddress, | ||
bool | is_soft = false |
||
) |
Add entry to data store.
Add entry to the current data store item.
Definition at line 217 of file RegistryEntry.cpp.
long DataSvcHelpers::RegistryEntry::add | ( | IRegistry * | obj | ) |
Add object to the container.
Definition at line 178 of file RegistryEntry.cpp.
|
inlineoverridevirtual |
IInterface implementation: Dereference the object.
Implements IRegistry.
Definition at line 115 of file RegistryEntry.h.
|
inlineoverridevirtual |
Retrieve opaque storage address.
Implements IRegistry.
Definition at line 125 of file RegistryEntry.h.
|
private |
The following entries serve two aspects: 1) They are faster for recursive calls, because they are non-virtual 2) They can be re-used for the non-const entry points using a const_cast of the result.
Recursive helper to assemble the full path name of the entry
Definition at line 315 of file RegistryEntry.cpp.
|
inline |
Return starting point for container iteration.
Definition at line 137 of file RegistryEntry.h.
|
inlineoverridevirtual |
Retrieve pointer to Transient Store.
Implements IRegistry.
Definition at line 121 of file RegistryEntry.h.
long DataSvcHelpers::RegistryEntry::deleteElements | ( | ) |
Delete all contained elements.
Delete recursively all elements pending from the current store item.
Definition at line 227 of file RegistryEntry.cpp.
|
inline |
Try to find an object identified by its pointer.
Definition at line 141 of file RegistryEntry.h.
|
inline |
Try to find an object identified by its relative name to the directory.
Definition at line 143 of file RegistryEntry.h.
|
inlineprivate |
Find identified leaf in this registry node.
Definition at line 95 of file RegistryEntry.h.
|
inlineprivate |
Find identified leaf in this registry node.
Definition at line 97 of file RegistryEntry.h.
|
private |
Internal method to add entries.
Add object to the container.
Definition at line 185 of file RegistryEntry.cpp.
|
private |
Internal method to create entries.
Internal method to add entries.
Definition at line 168 of file RegistryEntry.cpp.
Internal method to retrieve data directory.
Try to find an object identified by its pointer.
Definition at line 241 of file RegistryEntry.cpp.
|
private |
Internal method to retrieve data directory.
Find identified leaf in this registry node.
Definition at line 248 of file RegistryEntry.cpp.
|
private |
Internal method to locate object entry.
Find identified leaf in this registry node.
Definition at line 276 of file RegistryEntry.cpp.
|
inlineoverridevirtual |
Full identifier (or key)
Implements IRegistry.
Definition at line 119 of file RegistryEntry.h.
|
inline |
Simple check if the Container is empty.
Definition at line 135 of file RegistryEntry.h.
|
inline |
Is the link soft or hard.
Definition at line 129 of file RegistryEntry.h.
|
inline |
|
private |
Initialize link as hard link.
Create hard link.
Definition at line 101 of file RegistryEntry.cpp.
|
private |
Initialize link as hard link.
Create hard link.
Definition at line 110 of file RegistryEntry.cpp.
|
private |
Initialize link as soft link.
Create soft link.
Definition at line 84 of file RegistryEntry.cpp.
|
private |
Initialize link as soft link.
Create soft link.
Definition at line 94 of file RegistryEntry.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Retrive object behind the link.
Implements IRegistry.
Definition at line 123 of file RegistryEntry.h.
|
inline |
Pointer to parent directory entry.
Definition at line 127 of file RegistryEntry.h.
|
inlineprivate |
Pointer to parent registry entry.
Definition at line 93 of file RegistryEntry.h.
|
overridevirtual |
IInterface implementation: Reference the object.
Release entry.
Implements IRegistry.
Definition at line 68 of file RegistryEntry.cpp.
StatusCode DataSvcHelpers::RegistryEntry::remove | ( | boost::string_ref | name | ) |
Remove an entry from the store.
Remove entry from data store.
Definition at line 154 of file RegistryEntry.cpp.
long DataSvcHelpers::RegistryEntry::remove | ( | IRegistry * | obj | ) |
Remove an object from the container.
Definition at line 139 of file RegistryEntry.cpp.
|
overridevirtual |
Set/Update Opaque address.
Update Opaque address of registry entry.
Implements IRegistry.
Definition at line 117 of file RegistryEntry.cpp.
|
inlineprivate |
Set the transient data store.
Definition at line 91 of file RegistryEntry.h.
void DataSvcHelpers::RegistryEntry::setObject | ( | DataObject * | obj | ) |
Set/Update object address.
Set object pointer of data store item.
Definition at line 128 of file RegistryEntry.cpp.
|
private |
Set new parent pointer.
Definition at line 76 of file RegistryEntry.cpp.
|
inline |
Return the size of the container(=number of objects)
Definition at line 133 of file RegistryEntry.h.
StatusCode DataSvcHelpers::RegistryEntry::traverseTree | ( | IDataStoreAgent * | pAgent, |
int | level = 0 |
||
) |
traverse data tree
Definition at line 297 of file RegistryEntry.cpp.
Definition at line 44 of file RegistryEntry.h.
Definition at line 46 of file RegistryEntry.h.
|
private |
String containing full path of the object (volatile)
Definition at line 56 of file RegistryEntry.h.
|
private |
Is the link soft or hard?
Definition at line 54 of file RegistryEntry.h.
|
private |
Pointer to opaque address (load info)
Definition at line 62 of file RegistryEntry.h.
|
private |
Path name.
Definition at line 58 of file RegistryEntry.h.
|
private |
Pointer to hosting transient store.
Definition at line 66 of file RegistryEntry.h.
|
private |
Pointer to object.
Definition at line 64 of file RegistryEntry.h.
|
private |
Pointer to parent.
Definition at line 60 of file RegistryEntry.h.
|
private |
Reference counter.
Definition at line 52 of file RegistryEntry.h.
|
private |
Store of leaves.
Definition at line 68 of file RegistryEntry.h.