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

CdbBdbObjectConvertor Class Reference

This is a BDB specific Object Convertor. More...

#include <CdbBdbObjectConvertor.hh>

List of all members.

Static Public Member Functions

CdbStatus narrow (BdbHandle(BdbObject)&thePersObj, const CdbObjectPtr &thePtr)
 Narrow a transient meta-data object into a real persistent object.

template<class P> CdbStatus typeSafeNarrow (BdbHandle(P)&thePersObj, const CdbObjectPtr &thePtr)
 Narrow a transient meta-data object into a real persistent object of specified type.


Detailed Description

This is a BDB specific Object Convertor.

This is a utility class providing an interface to technology-specific implementations of the persistent object conversion. It's sussposed to be a kind of "type bridge" between the technology-independent part of the API and the technology-specific one.

Definition at line 18 of file CdbBdbObjectConvertor.hh.


Member Function Documentation

CdbStatus CdbBdbObjectConvertor::narrow BdbHandle(BdbObject)&    thePersObj,
const CdbObjectPtr   thePtr
[static]
 

Narrow a transient meta-data object into a real persistent object.

This operation will verify if the specified object pointer has expected technology, and if so it will extract the persistent handle out of this object.

Note, that it's up to teh end user to upcast from the resulting handle to a handle of the actual class.

See also:
CdbObject

CdbObjectPtr

CdbStatus

Parameters:
thePersObj  a persistent handle to be set up
thePtr  a smart input for an input object

Definition at line 26 of file CdbBdbObjectConvertor.cc.

References CdbStatus::Error, CdbCPtr< CdbObject, CdbDoNotClosePolicy< CdbObject > >::get(), CdbCPtr< Cdb, CdbDoNotClosePolicy< Cdb > >::isNull(), CdbStatus::Success, and CdbBdb::technology().

Referenced by CdbBdbNTupleP2T< ELEMENT_CONVERSION_RULES >::convert(), main(), CdbBdbWCondition::storeAndTruncateObject(), CdbBdbWCondition::storeObject(), CdbBdbSCondition::storeObject(), typeSafeNarrow(), and CdbBdbProxyCache::updateCache().

template<class P>
CdbStatus CdbBdbObjectConvertor::typeSafeNarrow BdbHandle(P)&    thePersObj,
const CdbObjectPtr   thePtr
[inline, static]
 

Narrow a transient meta-data object into a real persistent object of specified type.

This operation is a functional superset of the CdbBdbObjectConvertor::narrow() method. In addition it does the type matching for specified type. If the type does not match then it returns a error status.

See also:
CdbObject

CdbObjectPtr

CdbStatus

Parameters:
thePersObj  a persistent handle to be set up
thePtr  a smart input for an input object

Definition at line 49 of file CdbBdbObjectConvertor.hh.

References CdbStatus::Error, narrow(), and CdbStatus::Success.


The documentation for this class was generated from the following files:
Generated on Mon Dec 5 18:22:18 2005 for CDB by doxygen1.3-rc3