| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DataSvcHelpers::RegistryEntry Class Reference

Definition of an entry in the transient data store. More...

#include <GaudiKernel/RegistryEntry.h>

Inheritance diagram for DataSvcHelpers::RegistryEntry:

[legend]
Collaboration diagram for DataSvcHelpers::RegistryEntry:
[legend]
List of all members.

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 IDataProviderSvcdataSvc () const
 Retrieve pointer to Transient Store.
virtual DataObjectobject () const
 Retrive object behind the link.
virtual IOpaqueAddressaddress () const
 Retrieve opaque storage address.
virtual IRegistryparent () const
 Pointer to parent directory entry.
virtual bool isSoft () const
 Is the link soft or hard.
const Storeleaves () 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 IRegistryfind (const IRegistry *obj) const
 Try to find an object identified by its pointer.
virtual IRegistryfind (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.
IRegistryi_find (const IRegistry *pDirectory) const
 Internal method to retrieve data directory.
RegistryEntryi_find (const std::string &path) const
 Internal method to retrieve data directory.
RegistryEntryi_find (const DataObject *pObject) const
 Internal method to locate object entry.
RegistryEntryi_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 RegistryEntryparentEntry ()
 Pointer to parent registry entry.
RegistryEntryfindLeaf (const std::string &path) const
 Find identified leaf in this registry node.
RegistryEntryfindLeaf (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.
RegistryEntrym_pParent
 Pointer to parent.
IOpaqueAddressm_pAddress
 Pointer to opaque address (load info).
DataObjectm_pObject
 Pointer to object.
IDataProviderSvcm_pDataProviderSvc
 Pointer to hosting transient store.
Store m_store
 Store of leaves.

Friends

class ::DataSvc

Detailed Description

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.

Author:
Markus Frank

Sebastien Ponce

Definition at line 34 of file RegistryEntry.h.


Member Typedef Documentation

typedef std::vector<IRegistry*> DataSvcHelpers::RegistryEntry::Store [private]

Definition of datastore type.

Definition at line 37 of file RegistryEntry.h.

typedef Store::const_iterator DataSvcHelpers::RegistryEntry::Iterator

Iterator definition.

Definition at line 41 of file RegistryEntry.h.

typedef std::string IRegistry::name_type [inherited]

Type definitions Name type.

Definition at line 25 of file IRegistry.h.

typedef std::string IRegistry::id_type [inherited]

Identifier Key type.

Definition at line 27 of file IRegistry.h.


Constructor & Destructor Documentation

DataSvcHelpers::RegistryEntry::RegistryEntry ( const std::string &  path,
RegistryEntry parent = 0 
)

Standard Constructor.

virtual DataSvcHelpers::RegistryEntry::~RegistryEntry (  )  [virtual]

Standard Destructor.


Member Function Documentation

void DataSvcHelpers::RegistryEntry::assemblePath ( std::string &  buffer  )  const [private]

Recursive helper to assemble the full path name of the entry.

IRegistry* DataSvcHelpers::RegistryEntry::i_find ( const IRegistry pDirectory  )  const [private]

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]

IInterface implementation: Reference the object.

Implements IRegistry.

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]

Set/Update Opaque address.

Implements IRegistry.

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


Friends And Related Function Documentation

friend class ::DataSvc [friend]

Definition at line 39 of file RegistryEntry.h.


Member Data Documentation

unsigned long DataSvcHelpers::RegistryEntry::m_refCount [private]

Reference counter.

Definition at line 44 of file RegistryEntry.h.

bool DataSvcHelpers::RegistryEntry::m_isSoft [private]

Is the link soft or hard?

Definition at line 46 of file RegistryEntry.h.

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]

Path name.

Definition at line 50 of file RegistryEntry.h.

RegistryEntry* DataSvcHelpers::RegistryEntry::m_pParent [private]

Pointer to parent.

Definition at line 52 of file RegistryEntry.h.

IOpaqueAddress* DataSvcHelpers::RegistryEntry::m_pAddress [private]

Pointer to opaque address (load info).

Definition at line 54 of file RegistryEntry.h.

DataObject* DataSvcHelpers::RegistryEntry::m_pObject [private]

Pointer to object.

Definition at line 56 of file RegistryEntry.h.

IDataProviderSvc* DataSvcHelpers::RegistryEntry::m_pDataProviderSvc [private]

Pointer to hosting transient store.

Definition at line 58 of file RegistryEntry.h.

Store DataSvcHelpers::RegistryEntry::m_store [private]

Store of leaves.

Definition at line 60 of file RegistryEntry.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 19:57:16 2011 for GaudiKernel by doxygen 1.4.7