|
Gaudi Framework, version v23r2 |
| Home | Generated: Thu Jun 28 2012 |
A small class used to access easily (and efficiently) data items residing in data stores. More...
#include <SmartDataLocator.h>


Public Member Functions | |
| SmartDataLocator (IDataProviderSvc *pService, const std::string &fullPath) | |
| Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. | |
| SmartDataLocator (IDataProviderSvc *pService, IRegistry *pDirectory) | |
| Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its directory entry. | |
| SmartDataLocator (IDataProviderSvc *pService, DataObject *pObject, const std::string &path) | |
| Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. | |
| SmartDataLocator (SmartDataObjectPtr &refObject, IRegistry *pDirectory) | |
| Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. | |
| SmartDataLocator (SmartDataObjectPtr &refObject, const std::string &path) | |
| Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. | |
| virtual | ~SmartDataLocator () |
| Standard destructor. | |
| template<class OTHER > | |
| SmartDataPtr< OTHER > & | operator= (OTHER *pObj) |
| Automatic conversion to data type. | |
| template<class OTHER > | |
| SmartDataPtr< OTHER > & | operator= (const OTHER *pObj) |
| Automatic conversion to data type. | |
A small class used to access easily (and efficiently) data items residing in data stores.
The class constructors take several arguments neccessary to be passed tyo the data services in order to automatically load objects in case they are not yet loaded. This is achieved through a smart pointer mechanism i.e. by overloading the operator->() at dereferencing time the the object will be requested from the store.
The SmartDataLocator is meant to be "short living". It only makes sense to keep an object instance within e.g. the scope of one method. "long living" instances do not make sense and in the contrary would be harmful, because the information passed during construction to would be invalid and returned object pointers would actually point to hyperspace.
The intrinsic functionality, wether the object will be retrieved or loaded from the data store is defined by the LOADER::.
Base Class: SmartDataStorePtr
Definition at line 45 of file SmartDataLocator.h.
| SmartDataLocator< TYPE >::SmartDataLocator | ( | IDataProviderSvc * | pService, |
| const std::string & | fullPath | ||
| ) | [inline] |
Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent.
| pService | Pointer to the data service interface which should be used to load the object. |
| fullPath | Full path leading to the data object. |
Definition at line 55 of file SmartDataLocator.h.
: SmartDataStorePtr<TYPE,SmartDataObjectPtr::ObjectLoader>( pService,0,fullPath) { }
| SmartDataLocator< TYPE >::SmartDataLocator | ( | IDataProviderSvc * | pService, |
| IRegistry * | pDirectory | ||
| ) | [inline] |
Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its directory entry.
FASTEST ACCESS TO THE DATA STORE ***
| pService | Pointer to the data service interface which should be used to load the object. |
| pDirectory | Pointer to the data directory entry. |
Definition at line 68 of file SmartDataLocator.h.
: SmartDataStorePtr<TYPE,SmartDataObjectPtr::ObjectLoader>( pService,pDirectory,"") { }
| SmartDataLocator< TYPE >::SmartDataLocator | ( | IDataProviderSvc * | pService, |
| DataObject * | pObject, | ||
| const std::string & | path | ||
| ) | [inline] |
Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent.
The path is meant to address only ONE level, multiple path layers are invalid.
| pService | Pointer to the data service interface which should be used to load the object. |
| pObject | Pointer to the parent object. |
| path | Path to the data object relative to the parent object. |
Definition at line 84 of file SmartDataLocator.h.
: SmartDataStorePtr<TYPE,SmartDataObjectPtr::ObjectLoader>( pService,0,path) { if ( 0 != pObject ) { this->m_pDirectory = pObject->registry(); } }
| SmartDataLocator< TYPE >::SmartDataLocator | ( | SmartDataObjectPtr & | refObject, |
| IRegistry * | pDirectory | ||
| ) | [inline] |
Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent.
The path is meant to address only ONE level, multiple path layers are invalid.
| refObject | Smart Pointer to the parent object. |
| pDirectory | Pointer to the data directory entry. |
Definition at line 101 of file SmartDataLocator.h.
: SmartDataStorePtr<TYPE,SmartDataObjectPtr::ObjectLoader>( refObject.service(), pDirectory, "") { }
| SmartDataLocator< TYPE >::SmartDataLocator | ( | SmartDataObjectPtr & | refObject, |
| const std::string & | path | ||
| ) | [inline] |
Standard constructor: Construct an SmartDataLocator instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent.
The path is meant to address only ONE level, multiple path layers are invalid.
| refObject | Smart Pointer to the parent object. |
| path | Path to the data object relative to the parent object. |
Definition at line 115 of file SmartDataLocator.h.
: SmartDataStorePtr<TYPE,SmartDataObjectPtr::ObjectLoader>( refObject.service(), refObject.directory(), path) { }
| virtual SmartDataLocator< TYPE >::~SmartDataLocator | ( | ) | [inline, virtual] |
| SmartDataPtr<OTHER>& SmartDataLocator< TYPE >::operator= | ( | OTHER * | pObj ) | [inline] |
Automatic conversion to data type.
Definition at line 127 of file SmartDataLocator.h.
{
this->m_pObject = dynamic_cast<TYPE*>(pObj);
return *this;
}
| SmartDataPtr<OTHER>& SmartDataLocator< TYPE >::operator= | ( | const OTHER * | pObj ) | [inline] |
Automatic conversion to data type.
Definition at line 134 of file SmartDataLocator.h.
{
this->m_pObject = dynamic_cast<TYPE*>(const_cast<OTHER*>(pObj));
return *this;
}