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

CdbBdbNTupleFactory< T, NCOL > Class Template Reference

This is a BDB specific implementation for the factory. More...

#include <CdbBdbNTupleFactory.hh>

Inheritance diagram for CdbBdbNTupleFactory< T, NCOL >:

CdbBdbObjectFactory CdbObjectFactoryBase List of all members.

Public Member Functions

virtual ~CdbBdbNTupleFactory ()
 The destructor.

 CdbBdbNTupleFactory (const CdbCPtr< CdbNTuple< T, NCOL > > &thePtr)
 The constructor.


Protected Member Functions

virtual CdbStatus doCreate (BdbHandle(BdbObject)&theProduct, const BdbRefAny &theHint)
 This is a specialized persistent object creation method.


Detailed Description

template<class T, unsigned int NCOL>
class CdbBdbNTupleFactory< T, NCOL >

This is a BDB specific implementation for the factory.

This class is meant to be used to create persistent objects from instances of CdbTable and its derived classes assuming that the default conversion is available for element types of these tuples.

TEMPLATE PARAMETERS:

This class has two template parameters defining the type of a transient n-tuple. Teh parameters are the sdame (and have the same meaning) as in case of the transient CdbNTuple class.

Here is an example:

CdbCPtr<float,3> tuplePtr = ... ; // have a tuple

CdbBdbNTupleFactory<float,3> factory( tuplePtr ); // the factory is ready to be used

IMPORTANT USE NOTE:

Remember that the factory will accept and cache a counted smart pointer onto a tuple. This instance will be used as a source of information later on, at a time when a CDB API's implementation will be about to store the tuple. So make sure that you don't change the contents of the transient tuple (pointed to by the smart reference) between a code creating the factory and a code invoking CDB API, unless this is done on purpose.

See also:
class CdbBdbObjectFactory

class CdbTuple

class CdbBdbNTupleConversion

Definition at line 48 of file CdbBdbNTupleFactory.hh.


Constructor & Destructor Documentation

template<class T, unsigned int NCOL>
CdbBdbNTupleFactory< T, NCOL >::~CdbBdbNTupleFactory   [virtual]
 

The destructor.

It's here only to delete classes by a pointer onto this interface.

Definition at line 25 of file CdbBdbNTupleFactory.cc.

template<class T, unsigned int NCOL>
CdbBdbNTupleFactory< T, NCOL >::CdbBdbNTupleFactory const CdbCPtr< CdbNTuple< T, NCOL > > &    thePtr
 

The constructor.

The value of T type will be passed to the constructor of the corresponding class when the creation will be triggered. It's up to the developer of the persistent class how to treat this situation.

Definition at line 17 of file CdbBdbNTupleFactory.cc.

References CdbCPtr< CdbNTuple< T, NCOL > >::isNull().


Member Function Documentation

template<class T, unsigned int NCOL>
CdbStatus CdbBdbNTupleFactory< T, NCOL >::doCreate BdbHandle(BdbObject)&    theProduct,
const BdbRefAny &    theHint
[protected, virtual]
 

This is a specialized persistent object creation method.

This is a default implementation for this creator.

See also:
CdbObjectFactory::create()
Parameters:
theProduct  a reference to a new persistent object to be created
theHint  a placement hint for new object

Implements CdbBdbObjectFactory.

Definition at line 31 of file CdbBdbNTupleFactory.cc.

References BdbRef(), CdbBdbNTupleT2P< ELEMENT_CONVERSION_RULES >::convert(), and CdbStatus::Success.


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