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

CdbBdbObjectFactory Class Reference

This is an abstract base class for factories of the CdbObject class. More...

#include <CdbBdbObjectFactory.hh>

Inheritance diagram for CdbBdbObjectFactory:

CdbObjectFactoryBase CdbBdbNTupleFactory< T, NCOL > CdbBdbSSpecialObjectFactory CdbBdbSSpecialObjectFactory CdbBdbTObjectFactory< T, P > List of all members.

Public Member Functions

 CdbBdbObjectFactory (bool verifyFlag=true)
 The constructor.

virtual ~CdbBdbObjectFactory ()
 The destructor.

virtual CdbStatus create (CdbObjectPtr &thePtr, const CdbConditionPtr &theConditionPtr, const BdbTime &theBegin, const BdbTime &theEnd)
 Create a new object for specified validity interval.


Protected Member Functions

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


Detailed Description

This is an abstract base class for factories of the CdbObject class.

The "create" method of the base interface gets its default implementation in here. This implementattion will call a user provided pure virtual method to do the actual object creation. In fact this is a kind of "shell" for the object creation code. This shell will be called with the righ value of the hint.

See also:
CdbObjectFactoryBase

Definition at line 26 of file CdbBdbObjectFactory.hh.


Constructor & Destructor Documentation

CdbBdbObjectFactory::CdbBdbObjectFactory bool    verifyFlag = true [explicit]
 

The constructor.

The only parameter of the constructor is an optional switch allowing to turn of the verification of the user created object. This may be needed on some special occasions.

Definition at line 25 of file CdbBdbObjectFactory.cc.

CdbBdbObjectFactory::~CdbBdbObjectFactory   [virtual]
 

The destructor.

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

Definition at line 29 of file CdbBdbObjectFactory.cc.


Member Function Documentation

CdbStatus CdbBdbObjectFactory::create CdbObjectPtr   thePtr,
const CdbConditionPtr   theConditionPtr,
const BdbTime   theBegin,
const BdbTime   theEnd
[virtual]
 

Create a new object for specified validity interval.

This is a default implementation for this creator.

See also:
CdbObjectFactoryBase::create()
Parameters:
thePtr  a smart pointer to an object to be created
theConditionPtr  a condition where the new object will be registered at
theBegin  a point where the object's validity begins from
theEnd  ... and finishes (exclusing) at

Implements CdbObjectFactoryBase.

Definition at line 33 of file CdbBdbObjectFactory.cc.

References CdbStatus::ConflictOfParameters, doCreate(), CdbStatus::Error, CdbBdbObjectCreator::hint(), CdbStatus::IllegalParameters, CdbCPtr< CdbCondition, CdbAlwaysClosePolicy< CdbCondition > >::isNull(), CdbBdbObjectCreator::object(), CdbStatus::Success, CdbBdb::technology(), and CdbBdbObjectCreator::verify().

virtual CdbStatus CdbBdbObjectFactory::doCreate BdbHandle(BdbObject)&    theProduct,
const BdbRefAny &    theHint
[protected, pure virtual]
 

This is a specialized persistent object creation method.

This method (to be implemented by developers of specific persistent classes) handles the creation process. This method is parametrized through a "hint" parameter. The product of the operation is delivered into supplied pointer variable passed by reference.

This method will indicate the completion status of the operation through its return value of the CdbStatus type. A user can set this variable to communicate with the calling shell in order to indicate if the creation (for some reason) is not possible or failed.

See also:
CdbStatus
Parameters:
theProduct  a reference to a new persistent object to be created
theHint  a placement hint for new object

Implemented in CdbBdbTObjectFactory< T, P >, CdbBdbNTupleFactory< T, NCOL >, CdbBdbSSpecialObjectFactory, and CdbBdbSSpecialObjectFactory.

Referenced by create().


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