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

DbPersistent Class Reference

Definition of abstract persistent object. More...

#include <DbPersistent.h>

List of all members.

Public Methods

 DbPersistent ()
 Standard constructor.

virtual ~DbPersistent ()
 Standard destructor.

virtual const DbTypeInfotypeInfo () const = 0
virtual bool getBuffer (long start, long length, StreamBuffer& buff) = 0
 Fill StreamBuffer from persistent storage.

virtual bool setBuffer (long start, long length, const StreamBuffer& buff) = 0
 Write StreamBuffer to persistent storage.

virtual void release ()
 Release object. More...

virtual bool load (DbObject* pObject)
 Load object. More...

virtual bool save (const DbObject* pObject)
 Save object. More...


Static Public Methods

DbPersistentGuardcreateGuard ()
 Static method to create guard. More...

DbPersistentGuardguard (DbObject* pObj)
 Mediator: Access transient object guard.

const DbPersistentGuardguard (const DbObject* pObj)
 Mediator: Access transient object guard (CONST).

void setGuard (DbObject* pObj, DbPersistentGuard* pGuard)
 Mediator: Set transient object guard.

DbPersistent* persistent (const DbObject* pObj)
 Access persistent representation fro transient representation.

DbObjectcreate (const DbTypeInfo* type, DbPersistent* persistent, const dbHandle<DbContainer>& cntH)
 Create objects. More...

DbObjectload (DbPersistent* persistent, const dbHandle<DbContainer>& cntH)
 Load the object from the persistent storage. More...

void* allocate (const dbHandle<DbContainer>& nearH, const DbTypeInfo& type )
 Allocate persistent storage. More...


Detailed Description

Definition of abstract persistent object.

Class: DbPersistent

Purpose: Mediator between real persistent implementation and the transient part exposed by the package.

Dependencies:

History :

    +---------+----------------------------------------------+--------+
    |    Date |                 Comment                      | Who    |
    +---------+----------------------------------------------+--------+
    | 11/12/99| Initial version                              | MF     |
    +---------+----------------------------------------------+--------+
    

Author(s):
Markus Frank
Version:
1

Definition at line 110 of file DbPersistent.h.


Constructor & Destructor Documentation

DbPersistent::DbPersistent ( )
 

Standard constructor.

DbPersistent::~DbPersistent ( ) [virtual]
 

Standard destructor.


Member Function Documentation

void * DbPersistent::allocate ( const dbHandle< DbContainer >& cntH,
const DbTypeInfo & type ) [static]
 

Allocate persistent storage.

Definition at line 32 of file DbPersistent.cpp.

Referenced by DbObject::operator new().

DbObject * DbPersistent::create ( const DbTypeInfo * type,
DbPersistent * persistent,
const dbHandle< DbContainer >& cntH ) [static]
 

Create objects.

Definition at line 43 of file DbPersistent.cpp.

Referenced by load().

DbPersistentGuard * DbPersistent::createGuard ( ) [static]
 

Static method to create guard.

Definition at line 28 of file DbPersistent.cpp.

Referenced by DbObject::operator new().

bool DbPersistent::getBuffer ( long start,
long length,
StreamBuffer & buff ) [pure virtual]
 

Fill StreamBuffer from persistent storage.

Referenced by load().

const DbPersistentGuard * DbPersistent::guard ( const DbObject * pObj ) [static]
 

Mediator: Access transient object guard (CONST).

DbPersistentGuard * DbPersistent::guard ( DbObject * pObj ) [static]
 

Mediator: Access transient object guard.

Referenced by load(), and save().

DbObject * DbPersistent::load ( DbPersistent * persistent,
const dbHandle< DbContainer >& cntH ) [static]
 

Load the object from the persistent storage.

Definition at line 51 of file DbPersistent.cpp.

bool DbPersistent::load ( DbObject * pObj ) [virtual]
 

Load object.

Definition at line 58 of file DbPersistent.cpp.

Referenced by load().

DbPersistent * DbPersistent::persistent ( const DbObject * pObj ) [static]
 

Access persistent representation fro transient representation.

void DbPersistent::release ( ) [virtual]
 

Release object.

Definition at line 24 of file DbPersistent.cpp.

bool DbPersistent::save ( const DbObject * pObj ) [virtual]
 

Save object.

Definition at line 71 of file DbPersistent.cpp.

bool DbPersistent::setBuffer ( long start,
long length,
const StreamBuffer & buff ) [pure virtual]
 

Write StreamBuffer to persistent storage.

Referenced by save().

void DbPersistent::setGuard ( DbObject * pObj,
DbPersistentGuard * pGuard ) [static]
 

Mediator: Set transient object guard.

Referenced by allocate(), and create().

virtual const DbTypeInfo* DbPersistent::typeInfo ( ) const [pure virtual]
 

Referenced by load().


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