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

DbContainer Class Reference

Db objects: DbContainer. More...

#include <DbContainerObj.h>

Inheritance diagram for DbContainer:

DbAccessObj List of all members.

Public Types

typedef DbAccessObj<DbObject*,
DbObject
_Base
 Base class abbreviation. More...


Public Attributes

friend dbHandle<DbContainer>

Private Methods

 DbContainer (dbHandle<DbDataBase>& db, const std::string& name, const DbTypeInfo& info, DbAccessMode mode)
 Standard constructor of a container object using the database handle as a clustering hint. More...

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

IDbContainerinfo ()
 Access to internals. More...

IOODataBasedb ()
 Allow access to the database implementation. More...

IMessageSvc* msgSvc ()
 Allow access to the message service. More...

const DbTypeInfotypeInfo () const
 Allow access to the type information. More...

dbHandle<DbDataBase>& database ()
 Handle to database. More...

const dbHandle<DbDataBase>& database () const
 Handle to database (CONST). More...

long size () const
 Size of the database container (=# of objects). More...

DbResult open () const
 Open the container. More...

DbResult close () const
 Close the container. More...

DbResult addEntry (const dbHandle<DbObject>& handle)
 Add entry to the container. More...

DbResult updateEntry (const dbHandle<DbObject>& handle)
 Add object to the container. More...

DbResult find (const dbHandle<DbContainer>& cntH, dbHandle<DbObject>& objH, const dbHandle<DbLink>& link) const
 Find object within the container. More...

DbResult select (ISelectStatement* sel) const
 Perform selection. The statement belongs to the container after the call. More...

DbResult unselect () const
 Reset selection. More...

DbResult remove (dbHandle<DbObject>& element)
 Remove transient object representation. More...

IDbCursormakeCursor () const
 Create iterator cursor to loop over container elements. More...


Private Attributes

IOODataBasem_dbOOMs
 Pointer to specific DbOOMs implementation. More...

IDbContainerm_info
 Pointer to interface of the technology dependent part. More...

IMessageSvc* m_msgSvc
 Pointer to the message service to be used. More...

const DbTypeInfom_typeInfo
 Object type contained in this container. More...

dbHandle<DbDataBasem_database
 Handle to hosting database. More...

bool m_isOpen
 Flag indication status of technology dependent container. More...


Friends

class  DbDataBase
class  DbContainerImpl

Detailed Description

Db objects: DbContainer.

Description: Implementation independent part of a container object objects.

There is a ring of protection around the object. The object can only be accessed through its handle, the technology dependent code and the DbDataBase object hosting the container. This should ensure proper reference counting and inhibit non existing references flying around.

Dependencies:

History :

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

Definition at line 49 of file DbContainerObj.h.


Member Typedef Documentation

typedef DbAccessObj<DbObject*, DbObject > DbContainer::_Base
 

Base class abbreviation.

Definition at line 52 of file DbContainerObj.h.


Constructor & Destructor Documentation

DbContainer::DbContainer ( dbHandle< DbDataBase >& db,
const std::string & name,
const DbTypeInfo & info,
DbAccessMode mode ) [private]
 

Standard constructor of a container object using the database handle as a clustering hint.

Definition at line 22 of file DbContainerObj.cpp.

DbContainer::~DbContainer ( ) [private, virtual]
 

Standard destructor.

Definition at line 65 of file DbContainerObj.cpp.


Member Function Documentation

DbResult DbContainer::addEntry ( const dbHandle< DbObject >& handle ) [private]
 

Add entry to the container.

Definition at line 150 of file DbContainerObj.cpp.

DbResult DbContainer::close ( ) const [private]
 

Close the container.

Definition at line 122 of file DbContainerObj.cpp.

const dbHandle< DbDataBase >& DbContainer::database ( ) const [inline, private]
 

Handle to database (CONST).

Definition at line 116 of file DbContainerObj.h.

dbHandle< DbDataBase >& DbContainer::database ( ) [inline, private]
 

Handle to database.

Definition at line 112 of file DbContainerObj.h.

IOODataBase * DbContainer::db ( ) [inline, private]
 

Allow access to the database implementation.

Definition at line 128 of file DbContainerObj.h.

DbResult DbContainer::find ( const dbHandle< DbContainer >& cntH,
dbHandle< DbObject >& objH,
const dbHandle< DbLink >& link ) const [private]
 

Find object within the container.

Definition at line 170 of file DbContainerObj.cpp.

IDbContainer * DbContainer::info ( ) [inline, private]
 

Access to internals.

Definition at line 120 of file DbContainerObj.h.

IDbCursor * DbContainer::makeCursor ( ) const [private]
 

Create iterator cursor to loop over container elements.

Definition at line 209 of file DbContainerObj.cpp.

IMessageSvc * DbContainer::msgSvc ( ) [inline, private]
 

Allow access to the message service.

Definition at line 124 of file DbContainerObj.h.

DbResult DbContainer::open ( ) const [private]
 

Open the container.

Definition at line 108 of file DbContainerObj.cpp.

DbResult DbContainer::remove ( dbHandle< DbObject >& element ) [private]
 

Remove transient object representation.

Definition at line 181 of file DbContainerObj.cpp.

DbResult DbContainer::select ( ISelectStatement * sel ) const [private]
 

Perform selection. The statement belongs to the container after the call.

Definition at line 193 of file DbContainerObj.cpp.

long DbContainer::size ( ) const [private]
 

Size of the database container (=# of objects).

Definition at line 93 of file DbContainerObj.cpp.

const DbTypeInfo * DbContainer::typeInfo ( ) const [inline, private]
 

Allow access to the type information.

Definition at line 132 of file DbContainerObj.h.

DbResult DbContainer::unselect ( ) const [private]
 

Reset selection.

Definition at line 201 of file DbContainerObj.cpp.

DbResult DbContainer::updateEntry ( const dbHandle< DbObject >& handle ) [private]
 

Add object to the container.

Definition at line 161 of file DbContainerObj.cpp.


Friends And Related Function Documentation

class DbContainerImpl [friend]
 

Definition at line 55 of file DbContainerObj.h.

class DbDataBase [friend]
 

Friend declaration.

Definition at line 54 of file DbContainerObj.h.


Member Data Documentation

friend DbContainer::dbHandle<DbContainer>
 

Definition at line 56 of file DbContainerObj.h.

dbHandle< DbDataBase > DbContainer::m_database [mutable, private]
 

Handle to hosting database.

Definition at line 68 of file DbContainerObj.h.

IOODataBase * DbContainer::m_dbOOMs [private]
 

Pointer to specific DbOOMs implementation.

Definition at line 60 of file DbContainerObj.h.

IDbContainer * DbContainer::m_info [private]
 

Pointer to interface of the technology dependent part.

Definition at line 62 of file DbContainerObj.h.

bool DbContainer::m_isOpen [mutable, private]
 

Flag indication status of technology dependent container.

Definition at line 70 of file DbContainerObj.h.

IMessageSvc * DbContainer::m_msgSvc [private]
 

Pointer to the message service to be used.

Definition at line 64 of file DbContainerObj.h.

const DbTypeInfo & DbContainer::m_typeInfo [private]
 

Object type contained in this container.

Definition at line 66 of file DbContainerObj.h.


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