![]() |
The Gaudi Framework
master (ff829712)
|
Definition of an entry in the transient data store. More...
#include <GaudiKernel/RegistryEntry.h>
Public Types | |
typedef Store::const_iterator | Iterator |
Iterator definition. | |
![]() | |
typedef std::string | name_type |
Name type. | |
typedef std::string | id_type |
Identifier Key type. | |
Public Member Functions | |
RegistryEntry (std::string path, RegistryEntry *parent=nullptr) | |
Standard Constructor. | |
~RegistryEntry () override | |
Standard Destructor. | |
unsigned long | release () override |
IInterface implementation: Reference the object. | |
unsigned long | addRef () override |
IInterface implementation: Dereference the object. | |
const std::string & | name () const override |
Retrieve name of the entry. | |
const std::string & | identifier () const override |
Full identifier (or key) | |
IDataProviderSvc * | dataSvc () const override |
Retrieve pointer to Transient Store. | |
DataObject * | object () const override |
Retrive object behind the link. | |
IOpaqueAddress * | address () const override |
Retrieve opaque storage address. | |
IRegistry * | parent () const |
Pointer to parent directory entry. | |
bool | isSoft () const |
Is the link soft or hard. | |
const Store & | leaves () const |
Access the leaves of the object. | |
size_t | size () const |
Return the size of the container(=number of objects) | |
bool | isEmpty () const |
Simple check if the Container is empty. | |
Iterator | begin () const |
Return starting point for container iteration. | |
Iterator | end () const |
Return end elemtn if the container. | |
IRegistry * | find (const IRegistry *obj) const |
Try to find an object identified by its pointer. | |
IRegistry * | find (std::string_view path) const |
Try to find an object identified by its relative name to the directory. | |
void | setAddress (IOpaqueAddress *pAddress) override |
Set/Update Opaque address. | |
void | setObject (DataObject *obj) |
Set/Update object address. | |
StatusCode | add (std::string name, DataObject *pObject, bool is_soft=false) |
Add entry to data store. | |
StatusCode | add (std::string name, IOpaqueAddress *pAddress, bool is_soft=false) |
Add entry to data store. | |
StatusCode | remove (std::string_view name) |
Remove an entry from the store. | |
long | add (IRegistry *obj) |
Add object to the container. | |
long | remove (IRegistry *obj) |
Remove an object from the container. | |
long | deleteElements () |
Delete all contained elements. | |
StatusCode | traverseTree (IDataStoreAgent *pAgent, int level=0) |
traverse data tree | |
![]() | |
virtual | ~IRegistry ()=default |
destructor | |
Private Types | |
typedef std::vector< IRegistry * > | Store |
Definition of datastore type. | |
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. | |
IRegistry * | i_find (const IRegistry *pDirectory) const |
Internal method to retrieve data directory. | |
RegistryEntry * | i_find (std::string_view path) const |
Internal method to retrieve data directory. | |
RegistryEntry * | i_find (const DataObject *pObject) const |
Internal method to locate object entry. | |
RegistryEntry * | i_create (std::string name) |
Internal method to create entries. | |
long | i_add (RegistryEntry *entry) |
Internal method to add entries. | |
void | setParent (RegistryEntry *pParent) |
Set new parent pointer. | |
void | setDataSvc (IDataProviderSvc *s) |
Set the transient data store. | |
RegistryEntry * | parentEntry () |
Pointer to parent registry entry. | |
RegistryEntry * | findLeaf (std::string_view path) const |
Find identified leaf in this registry node. | |
RegistryEntry * | findLeaf (const DataObject *key) const |
Find identified leaf in this registry node. | |
void | makeHard (DataObject *pObject) |
Initialize link as hard link. | |
void | makeHard (IOpaqueAddress *pAddress) |
Initialize link as hard link. | |
void | makeSoft (DataObject *pObject) |
Initialize link as soft link. | |
void | makeSoft (IOpaqueAddress *pAddress) |
Initialize link as soft link. | |
Private Attributes | |
unsigned long | m_refCount = 0 |
Reference counter. | |
bool | m_isSoft = false |
Is the link soft or hard? | |
std::string | m_fullpath |
String containing full path of the object (volatile) | |
std::string | m_path |
Path name. | |
RegistryEntry * | m_pParent = nullptr |
Pointer to parent. | |
IOpaqueAddress * | m_pAddress = nullptr |
Pointer to opaque address (load info) | |
DataObject * | m_pObject = nullptr |
Pointer to object. | |
IDataProviderSvc * | m_pDataProviderSvc = nullptr |
Pointer to hosting transient store. | |
Store | m_store |
Store of leaves. | |
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 41 of file RegistryEntry.h.
typedef Store::const_iterator DataSvcHelpers::RegistryEntry::Iterator |
Iterator definition.
Definition at line 51 of file RegistryEntry.h.
|
private |
Definition of datastore type.
Definition at line 44 of file RegistryEntry.h.
DataSvcHelpers::RegistryEntry::RegistryEntry | ( | std::string | path, |
RegistryEntry * | parent = nullptr ) |
Standard Constructor.
Definition at line 28 of file RegistryEntry.cpp.
|
override |
Standard Destructor.
Standard destructor.
Definition at line 38 of file RegistryEntry.cpp.
long DataSvcHelpers::RegistryEntry::add | ( | IRegistry * | obj | ) |
Add object to the container.
Definition at line 149 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 173 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 182 of file RegistryEntry.cpp.
|
inlineoverridevirtual |
IInterface implementation: Dereference the object.
Implements IRegistry.
Definition at line 118 of file RegistryEntry.h.
|
inlineoverridevirtual |
Retrieve opaque storage address.
Implements IRegistry.
Definition at line 128 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 271 of file RegistryEntry.cpp.
|
inline |
|
inlineoverridevirtual |
Retrieve pointer to Transient Store.
Implements IRegistry.
Definition at line 124 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 191 of file RegistryEntry.cpp.
|
inline |
Try to find an object identified by its pointer.
Definition at line 144 of file RegistryEntry.h.
|
inline |
Try to find an object identified by its relative name to the directory.
Definition at line 146 of file RegistryEntry.h.
|
inlineprivate |
|
inlineprivate |
|
private |
Internal method to add entries.
Add object to the container.
Definition at line 155 of file RegistryEntry.cpp.
|
private |
Internal method to create entries.
Internal method to add entries.
Definition at line 140 of file RegistryEntry.cpp.
|
private |
Internal method to locate object entry.
Find identified leaf in this registry node.
Definition at line 237 of file RegistryEntry.cpp.
Internal method to retrieve data directory.
Try to find an object identified by its pointer.
Definition at line 204 of file RegistryEntry.cpp.
|
private |
Internal method to retrieve data directory.
Find identified leaf in this registry node.
Definition at line 210 of file RegistryEntry.cpp.
|
inlineoverridevirtual |
|
inline |
|
inline |
|
inline |
|
private |
Initialize link as hard link.
Create hard link.
Definition at line 80 of file RegistryEntry.cpp.
|
private |
Initialize link as hard link.
Create hard link.
Definition at line 88 of file RegistryEntry.cpp.
|
private |
Initialize link as soft link.
Create soft link.
Definition at line 65 of file RegistryEntry.cpp.
|
private |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Retrive object behind the link.
Implements IRegistry.
Definition at line 126 of file RegistryEntry.h.
|
inline |
|
inlineprivate |
|
overridevirtual |
IInterface implementation: Reference the object.
Release entry.
Implements IRegistry.
Definition at line 51 of file RegistryEntry.cpp.
long DataSvcHelpers::RegistryEntry::remove | ( | IRegistry * | obj | ) |
Remove an object from the container.
Definition at line 114 of file RegistryEntry.cpp.
StatusCode DataSvcHelpers::RegistryEntry::remove | ( | std::string_view | name | ) |
Remove an entry from the store.
Remove entry from data store.
Definition at line 127 of file RegistryEntry.cpp.
|
overridevirtual |
Set/Update Opaque address.
Update Opaque address of registry entry.
Implements IRegistry.
Definition at line 94 of file RegistryEntry.cpp.
|
inlineprivate |
void DataSvcHelpers::RegistryEntry::setObject | ( | DataObject * | obj | ) |
Set/Update object address.
Set object pointer of data store item.
Definition at line 104 of file RegistryEntry.cpp.
|
private |
Set new parent pointer.
Definition at line 58 of file RegistryEntry.cpp.
|
inline |
Return the size of the container(=number of objects)
Definition at line 136 of file RegistryEntry.h.
StatusCode DataSvcHelpers::RegistryEntry::traverseTree | ( | IDataStoreAgent * | pAgent, |
int | level = 0 ) |
traverse data tree
Definition at line 256 of file RegistryEntry.cpp.
Definition at line 47 of file RegistryEntry.h.
|
friend |
Definition at line 49 of file RegistryEntry.h.
|
private |
String containing full path of the object (volatile)
Definition at line 59 of file RegistryEntry.h.
|
private |
Is the link soft or hard?
Definition at line 57 of file RegistryEntry.h.
|
private |
Pointer to opaque address (load info)
Definition at line 65 of file RegistryEntry.h.
|
private |
Path name.
Definition at line 61 of file RegistryEntry.h.
|
private |
Pointer to hosting transient store.
Definition at line 69 of file RegistryEntry.h.
|
private |
Pointer to object.
Definition at line 67 of file RegistryEntry.h.
|
private |
Pointer to parent.
Definition at line 63 of file RegistryEntry.h.
|
private |
Reference counter.
Definition at line 55 of file RegistryEntry.h.
|
private |
Store of leaves.
Definition at line 71 of file RegistryEntry.h.