Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

SmartDataPtr Class Template Reference

A small class used to access easily (and efficiently) data items residing in data stores. More...

#include <SmartDataPtr.h>

Inheritance diagram for SmartDataPtr:

SmartDataStorePtr SmartDataObjectPtr List of all members.

Public Methods

 SmartDataPtr (IDataProviderSvc* pService, const std::string& fullPath)
 Standard constructor: Construct an SmartDataPtr instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. More...

 SmartDataPtr (IDataProviderSvc* pService, IDataDirectory* pDirectory)
 Standard constructor: Construct an SmartDataPtr instance which is able to connect to a DataObject instance which is identified by its directory entry. More...

 SmartDataPtr (IDataProviderSvc* pService, DataObject* pObject, const std::string& path)
 Standard constructor: Construct an SmartDataPtr instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. More...

 SmartDataPtr (SmartDataObjectPtr& refObject, IDataDirectory* pDirectory)
 Standard constructor: Construct an SmartDataPtr instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. More...

 SmartDataPtr (SmartDataObjectPtr& refObject, const std::string& path)
 Standard constructor: Construct an SmartDataPtr instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent. More...

 SmartDataPtr (const SmartDataObjectPtr& copy)
 Copy constructor: Construct an copy of a SmartDataPtr instance. More...

virtual ~SmartDataPtr ()
 Standard destructor. More...

template<classOTHER> SmartDataPtr& operator=<OTHER> ( OTHER* pObj )
 Automatic conversion to data type. More...


Detailed Description

template<class TYPE> template class SmartDataPtr

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 SmartDataPtr 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

Dependencies:

History :

    +---------+----------------------------------------------+--------+
    |    Date |                 Comment                      | Who    |
    +---------+----------------------------------------------+--------+
    | 21/04/99| Initial version.                             | MF     |
    +---------+----------------------------------------------+--------+
    
Author: M.Frank Version: 1.0

Definition at line 58 of file SmartDataPtr.h.


Constructor & Destructor Documentation

template<classTYPE>
SmartDataPtr<TYPE>::SmartDataPtr<TYPE> ( IDataProviderSvc * pService,
const std::string & fullPath ) [inline]
 

Standard constructor: Construct an SmartDataPtr instance which is able to connect to a DataObject instance which is identified by its parent object and the path relative to the parent.

Parameters:
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 68 of file SmartDataPtr.h.

template<classTYPE>
SmartDataPtr<TYPE>::SmartDataPtr<TYPE> ( IDataProviderSvc * pService,
IDataDirectory * pDirectory ) [inline]
 

Standard constructor: Construct an SmartDataPtr instance which is able to connect to a DataObject instance which is identified by its directory entry.

FASTEST ACCESS TO THE DATA STORE ***

Parameters:
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 80 of file SmartDataPtr.h.

template<classTYPE>
SmartDataPtr<TYPE>::SmartDataPtr<TYPE> ( IDataProviderSvc * pService,
DataObject * pObject,
const std::string & path ) [inline]
 

Standard constructor: Construct an SmartDataPtr 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.

Parameters:
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 95 of file SmartDataPtr.h.

template<classTYPE>
SmartDataPtr<TYPE>::SmartDataPtr<TYPE> ( SmartDataObjectPtr & refObject,
IDataDirectory * pDirectory ) [inline]
 

Standard constructor: Construct an SmartDataPtr 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.

Parameters:
refObject   Smart Pointer to the parent object.
pDirectory   Pointer to the data directory entry.

Definition at line 111 of file SmartDataPtr.h.

template<classTYPE>
SmartDataPtr<TYPE>::SmartDataPtr<TYPE> ( SmartDataObjectPtr & refObject,
const std::string & path ) [inline]
 

Standard constructor: Construct an SmartDataPtr 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.

Parameters:
refObject   Smart Pointer to the parent object.
path   Path to the data object relative to the parent object.

Definition at line 124 of file SmartDataPtr.h.

template<classTYPE>
SmartDataPtr<TYPE>::SmartDataPtr<TYPE> ( const SmartDataObjectPtr & copy ) [inline]
 

Copy constructor: Construct an copy of a SmartDataPtr instance.

Parameters:
copy   Copy Smart Pointer to object.

Definition at line 131 of file SmartDataPtr.h.

template<classTYPE>
SmartDataPtr<TYPE>::~SmartDataPtr<TYPE> ( ) [inline, virtual]
 

Standard destructor.

Definition at line 137 of file SmartDataPtr.h.


Member Function Documentation

template<classTYPE>
template<classOTHER>
SmartDataPtr<TYPE> & SmartDataPtr<TYPE>::operator= ( OTHER * pObj ) [inline]
 

Automatic conversion to data type.

Reimplemented from SmartDataStorePtr.

Definition at line 141 of file SmartDataPtr.h.


The documentation for this class was generated from the following file:
Generated at Wed Nov 21 12:22:15 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000