#include <GaudiKernel/RegistryEntry.h>
Inheritance diagram for DataSvcHelpers::RegistryEntry:
Public Types | |
typedef Store::const_iterator | Iterator |
Iterator definition. | |
typedef std::string | name_type |
Type definitions Name type. | |
typedef std::string | id_type |
Identifier Key type. | |
Public Member Functions | |
RegistryEntry (const std::string &path, RegistryEntry *parent=0) | |
Standard Constructor. | |
virtual | ~RegistryEntry () |
Standard Destructor. | |
virtual unsigned long | release () |
IInterface implementation: Reference the object. | |
virtual unsigned long | addRef () |
IInterface implementation: Dereference the object. | |
const std::string & | name () const |
Retrieve name of the entry. | |
virtual const std::string & | identifier () const |
Full identifier (or key). | |
virtual IDataProviderSvc * | dataSvc () const |
Retrieve pointer to Transient Store. | |
virtual DataObject * | object () const |
Retrive object behind the link. | |
virtual IOpaqueAddress * | address () const |
Retrieve opaque storage address. | |
virtual IRegistry * | parent () const |
Pointer to parent directory entry. | |
virtual bool | isSoft () const |
Is the link soft or hard. | |
const Store & | leaves () const |
Access the leaves of the object. | |
virtual int | size () const |
Return the size of the container(=number of objects). | |
virtual bool | isEmpty () const |
Simple check if the Container is empty. | |
virtual Iterator | begin () const |
Return starting point for container iteration. | |
virtual Iterator | end () const |
Return end elemtn if the container. | |
virtual IRegistry * | find (const IRegistry *obj) const |
Try to find an object identified by its pointer. | |
virtual IRegistry * | find (const std::string &path) const |
Try to find an object identified by its relative name to the directory. | |
void | setAddress (IOpaqueAddress *pAddress) |
Set/Update Opaque address. | |
void | setObject (DataObject *obj) |
Set/Update object address. | |
virtual long | add (const std::string &name, DataObject *pObject, bool is_soft=false) |
Add entry to data store. | |
virtual long | add (const std::string &name, IOpaqueAddress *pAddress, bool is_soft=false) |
Add entry to data store. | |
virtual long | remove (const std::string &name) |
Remove an entry from the store. | |
virtual long | add (IRegistry *obj) |
Add object to the container. | |
virtual long | remove (IRegistry *obj) |
Remove an object from the container. | |
virtual long | deleteElements () |
Delete all contained elements. | |
virtual long | traverseTree (IDataStoreAgent *pAgent, int level=0) |
traverse data tree | |
Private Types | |
typedef std::vector< IRegistry * > | Store |
Definition of datastore type. | |
Private Member Functions | |
void | assemblePath (std::string &buffer) const |
Recursive helper to assemble the full path name of the entry. | |
IRegistry * | i_find (const IRegistry *pDirectory) const |
Internal method to retrieve data directory. | |
RegistryEntry * | i_find (const std::string &path) const |
Internal method to retrieve data directory. | |
RegistryEntry * | i_find (const DataObject *pObject) const |
Internal method to locate object entry. | |
RegistryEntry * | i_add (const std::string &name) |
Internal method to add entries. | |
void | setParent (RegistryEntry *pParent) |
Set new parent pointer. | |
void | setDataSvc (IDataProviderSvc *s) |
Set the transient data store. | |
virtual RegistryEntry * | parentEntry () |
Pointer to parent registry entry. | |
RegistryEntry * | findLeaf (const std::string &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 |
Reference counter. | |
bool | m_isSoft |
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 |
Pointer to parent. | |
IOpaqueAddress * | m_pAddress |
Pointer to opaque address (load info). | |
DataObject * | m_pObject |
Pointer to object. | |
IDataProviderSvc * | m_pDataProviderSvc |
Pointer to hosting transient store. | |
Store | m_store |
Store of leaves. | |
Friends | |
class | ::DataSvc |
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.
Sebastien Ponce
Definition at line 34 of file RegistryEntry.h.
typedef std::vector<IRegistry*> DataSvcHelpers::RegistryEntry::Store [private] |
typedef Store::const_iterator DataSvcHelpers::RegistryEntry::Iterator |
typedef std::string IRegistry::name_type [inherited] |
typedef std::string IRegistry::id_type [inherited] |
DataSvcHelpers::RegistryEntry::RegistryEntry | ( | const std::string & | path, | |
RegistryEntry * | parent = 0 | |||
) |
Standard Constructor.
virtual DataSvcHelpers::RegistryEntry::~RegistryEntry | ( | ) | [virtual] |
Standard Destructor.
void DataSvcHelpers::RegistryEntry::assemblePath | ( | std::string & | buffer | ) | const [private] |
Recursive helper to assemble the full path name of the entry.
Internal method to retrieve data directory.
RegistryEntry* DataSvcHelpers::RegistryEntry::i_find | ( | const std::string & | path | ) | const [private] |
Internal method to retrieve data directory.
RegistryEntry* DataSvcHelpers::RegistryEntry::i_find | ( | const DataObject * | pObject | ) | const [private] |
Internal method to locate object entry.
RegistryEntry* DataSvcHelpers::RegistryEntry::i_add | ( | const std::string & | name | ) | [private] |
Internal method to add entries.
void DataSvcHelpers::RegistryEntry::setParent | ( | RegistryEntry * | pParent | ) | [private] |
Set new parent pointer.
void DataSvcHelpers::RegistryEntry::setDataSvc | ( | IDataProviderSvc * | s | ) | [inline, private] |
Set the transient data store.
Definition at line 81 of file RegistryEntry.h.
00081 { 00082 m_pDataProviderSvc = s; 00083 }
virtual RegistryEntry* DataSvcHelpers::RegistryEntry::parentEntry | ( | ) | [inline, private, virtual] |
Pointer to parent registry entry.
Definition at line 85 of file RegistryEntry.h.
00085 { 00086 return m_pParent; 00087 }
RegistryEntry* DataSvcHelpers::RegistryEntry::findLeaf | ( | const std::string & | path | ) | const [inline, private] |
Find identified leaf in this registry node.
Definition at line 89 of file RegistryEntry.h.
00089 { 00090 return i_find(path); 00091 }
RegistryEntry* DataSvcHelpers::RegistryEntry::findLeaf | ( | const DataObject * | key | ) | const [inline, private] |
Find identified leaf in this registry node.
Definition at line 93 of file RegistryEntry.h.
00093 { 00094 return i_find(key); 00095 }
void DataSvcHelpers::RegistryEntry::makeHard | ( | DataObject * | pObject | ) | [private] |
Initialize link as hard link.
void DataSvcHelpers::RegistryEntry::makeHard | ( | IOpaqueAddress * | pAddress | ) | [private] |
Initialize link as hard link.
void DataSvcHelpers::RegistryEntry::makeSoft | ( | DataObject * | pObject | ) | [private] |
Initialize link as soft link.
void DataSvcHelpers::RegistryEntry::makeSoft | ( | IOpaqueAddress * | pAddress | ) | [private] |
Initialize link as soft link.
virtual unsigned long DataSvcHelpers::RegistryEntry::release | ( | ) | [virtual] |
virtual unsigned long DataSvcHelpers::RegistryEntry::addRef | ( | ) | [inline, virtual] |
IInterface implementation: Dereference the object.
Implements IRegistry.
Definition at line 112 of file RegistryEntry.h.
00112 { 00113 return ++m_refCount; 00114 }
const std::string& DataSvcHelpers::RegistryEntry::name | ( | ) | const [inline, virtual] |
Retrieve name of the entry.
Implements IRegistry.
Definition at line 116 of file RegistryEntry.h.
00116 { 00117 return m_path; 00118 }
virtual const std::string& DataSvcHelpers::RegistryEntry::identifier | ( | ) | const [inline, virtual] |
Full identifier (or key).
Implements IRegistry.
Definition at line 120 of file RegistryEntry.h.
00120 { 00121 return m_fullpath; 00122 }
virtual IDataProviderSvc* DataSvcHelpers::RegistryEntry::dataSvc | ( | ) | const [inline, virtual] |
Retrieve pointer to Transient Store.
Implements IRegistry.
Definition at line 124 of file RegistryEntry.h.
00124 { 00125 return m_pDataProviderSvc; 00126 }
virtual DataObject* DataSvcHelpers::RegistryEntry::object | ( | ) | const [inline, virtual] |
Retrive object behind the link.
Implements IRegistry.
Definition at line 128 of file RegistryEntry.h.
00128 { 00129 return m_pObject; 00130 }
virtual IOpaqueAddress* DataSvcHelpers::RegistryEntry::address | ( | ) | const [inline, virtual] |
Retrieve opaque storage address.
Implements IRegistry.
Definition at line 132 of file RegistryEntry.h.
00132 { 00133 return m_pAddress; 00134 }
virtual IRegistry* DataSvcHelpers::RegistryEntry::parent | ( | ) | const [inline, virtual] |
Pointer to parent directory entry.
Definition at line 136 of file RegistryEntry.h.
00136 { 00137 return m_pParent; 00138 }
virtual bool DataSvcHelpers::RegistryEntry::isSoft | ( | ) | const [inline, virtual] |
Is the link soft or hard.
Definition at line 140 of file RegistryEntry.h.
00140 { 00141 return m_isSoft; 00142 }
const Store& DataSvcHelpers::RegistryEntry::leaves | ( | ) | const [inline] |
Access the leaves of the object.
Definition at line 144 of file RegistryEntry.h.
00144 { 00145 return m_store; 00146 }
virtual int DataSvcHelpers::RegistryEntry::size | ( | ) | const [inline, virtual] |
Return the size of the container(=number of objects).
Definition at line 148 of file RegistryEntry.h.
00148 { 00149 return m_store.size(); 00150 }
virtual bool DataSvcHelpers::RegistryEntry::isEmpty | ( | ) | const [inline, virtual] |
Simple check if the Container is empty.
Definition at line 152 of file RegistryEntry.h.
00152 { 00153 return m_store.size() == 0; 00154 }
virtual Iterator DataSvcHelpers::RegistryEntry::begin | ( | ) | const [inline, virtual] |
Return starting point for container iteration.
Definition at line 156 of file RegistryEntry.h.
00156 { 00157 return m_store.begin(); 00158 }
virtual Iterator DataSvcHelpers::RegistryEntry::end | ( | ) | const [inline, virtual] |
Return end elemtn if the container.
Definition at line 160 of file RegistryEntry.h.
00160 { 00161 return m_store.end(); 00162 }
virtual IRegistry* DataSvcHelpers::RegistryEntry::find | ( | const IRegistry * | obj | ) | const [inline, virtual] |
Try to find an object identified by its pointer.
Definition at line 164 of file RegistryEntry.h.
00164 { 00165 return i_find(obj); 00166 }
virtual IRegistry* DataSvcHelpers::RegistryEntry::find | ( | const std::string & | path | ) | const [inline, virtual] |
Try to find an object identified by its relative name to the directory.
Definition at line 168 of file RegistryEntry.h.
00168 { 00169 return i_find(path); 00170 }
void DataSvcHelpers::RegistryEntry::setAddress | ( | IOpaqueAddress * | pAddress | ) | [virtual] |
void DataSvcHelpers::RegistryEntry::setObject | ( | DataObject * | obj | ) |
Set/Update object address.
virtual long DataSvcHelpers::RegistryEntry::add | ( | const std::string & | name, | |
DataObject * | pObject, | |||
bool | is_soft = false | |||
) | [virtual] |
Add entry to data store.
virtual long DataSvcHelpers::RegistryEntry::add | ( | const std::string & | name, | |
IOpaqueAddress * | pAddress, | |||
bool | is_soft = false | |||
) | [virtual] |
Add entry to data store.
virtual long DataSvcHelpers::RegistryEntry::remove | ( | const std::string & | name | ) | [virtual] |
Remove an entry from the store.
virtual long DataSvcHelpers::RegistryEntry::add | ( | IRegistry * | obj | ) | [virtual] |
Add object to the container.
virtual long DataSvcHelpers::RegistryEntry::remove | ( | IRegistry * | obj | ) | [virtual] |
Remove an object from the container.
virtual long DataSvcHelpers::RegistryEntry::deleteElements | ( | ) | [virtual] |
Delete all contained elements.
virtual long DataSvcHelpers::RegistryEntry::traverseTree | ( | IDataStoreAgent * | pAgent, | |
int | level = 0 | |||
) | [virtual] |
traverse data tree
friend class ::DataSvc [friend] |
Definition at line 39 of file RegistryEntry.h.
unsigned long DataSvcHelpers::RegistryEntry::m_refCount [private] |
bool DataSvcHelpers::RegistryEntry::m_isSoft [private] |
std::string DataSvcHelpers::RegistryEntry::m_fullpath [private] |
String containing full path of the object (volatile).
Definition at line 48 of file RegistryEntry.h.
std::string DataSvcHelpers::RegistryEntry::m_path [private] |
Store DataSvcHelpers::RegistryEntry::m_store [private] |