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

OODataBaseImplementation Class Reference

"Generic" OODataBase implementation. More...

#include <DbImplementation.h>

Inheritance diagram for OODataBaseImplementation:

IInterface IOODataBase IProperty IInterface List of all members.

Public Methods

virtual unsigned long addRef ()
 IInterface implementation: Increase reference count. More...

virtual unsigned long release ()
 IInterface implementation: Decrease reference count. More...

virtual StatusCode queryInterface (const IID& riid, void** ppvInterface)
 IInterface implementation: Query interface. More...

virtual StatusCode initialize (const std::string& name)
 IOODataBase implementation: Initialize the database. More...

virtual StatusCode finalize (void)
 IOODataBase implementation: Finalize the database. More...

virtual unsigned char type () const
 IOODataBase implementation: Access to OODataBase type. More...

virtual const std::string& name () const
 IOODataBase implementation: Object's name. More...

virtual const std::string& driver () const
 IOODataBase implementation: Driver's name. More...

virtual void setDriver (const std::string& drv)
 IOODataBase implementation: Set the name of the driver's implementation. More...

virtual const std::string& server () const
 IOODataBase implementation: Database server's name. More...

virtual void setServer (const std::string& srv)
 IOODataBase implementation: Set the name of the database server host. More...

virtual const DbTypeInfotypeInfo (const std::string& nam) const
 IOODataBase implementation: Retrieve type information (CONST). More...

virtual DbTypeInfotypeInfo (const std::string& nam)
 IOODataBase implementation: Retrieve type information. More...

virtual DbResult addTypeInfo (const std::string& nam, DbTypeInfo * info)
 IOODataBase implementation: Add type information. More...

virtual DbTypeInfoaddTypeInfo (const std::string& nam, const std::string& t_type, const std::string& p_type, const std::string& desc, std::vector<DbColumn*>& cols)
 IOODataBase implementation: Create type information item for object binding. More...

virtual DbTypeInfoaddTypeInfo (const IDbDataBase::Type* pType)
 IOODataBase implementation: Create type information item for object binding. More...

virtual DbResult prepareLink (const dbObjectHandle<DbObject>& objH, dbHandle<DbLink>& linkH, void* gen)
 IOODataBase implementation: Prepare link between objects. More...

virtual StatusCode setProperty (const Property& p)
virtual StatusCode setProperty ( std::istream& s )
 Implementation of IProperty::setProperty. More...

virtual StatusCode setProperty ( const std::string& n, const std::string& v)
 Implementation of IProperty::setProperty. More...

virtual StatusCode getProperty (Property* p) const
virtual const Property& getProperty ( const std::string& name) const
virtual StatusCode getProperty ( const std::string& n, std::string& v ) const
 Implementation of IProperty::getProperty. More...

virtual const std::vector<
Property*>& 
getProperties ( ) const
virtual StatusCode setProperties ()
template<classT> StatusCode declareProperty ( const std::string& name, T& property ) const
 Declare named properties. More...

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

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


Protected Methods

 OODataBaseImplementation (IInterface* loc, unsigned char typ)
 Standard Constructor. More...

virtual ~OODataBaseImplementation ()
 Standard Destructor. More...


Protected Attributes

long m_refCount
 Reference counter. More...

unsigned char m_type
 Type the implementation belongs to. More...

std::string m_name
 Object name. More...

std::string m_driver
 Driver's name. More...

std::string m_server
 Driver's name. More...

std::string m_defTType
 Default transient object type. More...

std::string m_defPType
 Default persistent object type. More...

ISvcLocator* m_svcLocator
 Reference to service locator object. More...

IMessageSvc* m_messageSvc
 Reference to message service. More...

PropertyMgr* m_propertyMgr
 Reference to proprty manager. More...

IObjManager* m_objMgr
 Reference to the object manager. More...


Private Types

typedef std::map<std::string,
DbTypeInfo*> 
DataTypes

Private Attributes

DataTypes m_types

Detailed Description

"Generic" OODataBase implementation.

Description: Generic helper class to implement stuff common to all existing databases. The base implementations can allways be overwritten.

History :

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

Definition at line 92 of file DbImplementation.h.


Member Typedef Documentation

typedef std::map<std::string, DbTypeInfo*> OODataBaseImplementation::DataTypes [private]
 

Definition at line 98 of file DbImplementation.h.


Constructor & Destructor Documentation

OODataBaseImplementation::OODataBaseImplementation ( IInterface * loc,
unsigned char typ ) [protected]
 

Standard Constructor.

Definition at line 47 of file DbImplementation.cpp.

OODataBaseImplementation::~OODataBaseImplementation ( ) [protected, virtual]
 

Standard Destructor.

Definition at line 68 of file DbImplementation.cpp.


Member Function Documentation

unsigned long OODataBaseImplementation::addRef ( ) [virtual]
 

IInterface implementation: Increase reference count.

Definition at line 86 of file DbImplementation.cpp.

Referenced by queryInterface().

DbTypeInfo * OODataBaseImplementation::addTypeInfo ( const IDbDataBase::Type * pType ) [virtual]
 

IOODataBase implementation: Create type information item for object binding.

Reimplemented from IOODataBase.

Definition at line 232 of file DbImplementation.cpp.

DbTypeInfo * OODataBaseImplementation::addTypeInfo ( const std::string & nam,
const std::string & t_type,
const std::string & p_type,
const std::string & desc,
std::vector< DbColumn *>& cols ) [virtual]
 

IOODataBase implementation: Create type information item for object binding.

Reimplemented from IOODataBase.

Definition at line 195 of file DbImplementation.cpp.

DbResult OODataBaseImplementation::addTypeInfo ( const std::string & name,
DbTypeInfo * info ) [virtual]
 

IOODataBase implementation: Add type information.

Reimplemented from IOODataBase.

Definition at line 185 of file DbImplementation.cpp.

Referenced by addTypeInfo().

template<classT>
StatusCode OODataBaseImplementation::declareProperty ( const std::string & name,
T & property ) const [inline]
 

Declare named properties.

Definition at line 181 of file DbImplementation.h.

Referenced by OODataBaseImplementation().

const std::string & OODataBaseImplementation::driver ( ) const [virtual]
 

IOODataBase implementation: Driver's name.

Reimplemented from IOODataBase.

Definition at line 128 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::finalize ( void ) [virtual]
 

IOODataBase implementation: Finalize the database.

Reimplemented from IOODataBase.

Definition at line 162 of file DbImplementation.cpp.

const std::vector< Property *>& OODataBaseImplementation::getProperties ( ) const [virtual]
 

Definition at line 301 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::getProperty ( const std::string & n,
std::string & v ) const [virtual]
 

Implementation of IProperty::getProperty.

Definition at line 297 of file DbImplementation.cpp.

const Property & OODataBaseImplementation::getProperty ( const std::string & name ) const [virtual]
 

Definition at line 293 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::getProperty ( Property * p ) const [virtual]
 

Definition at line 289 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::initialize ( const std::string & name ) [virtual]
 

IOODataBase implementation: Initialize the database.

Reimplemented from IOODataBase.

Definition at line 148 of file DbImplementation.cpp.

const IMessageSvc * OODataBaseImplementation::msgSvc ( ) const
 

Allow access to message service (CONST).

Definition at line 81 of file DbImplementation.cpp.

IMessageSvc * OODataBaseImplementation::msgSvc ( ) [virtual]
 

Allow access to message service.

Reimplemented from IOODataBase.

Definition at line 76 of file DbImplementation.cpp.

const std::string & OODataBaseImplementation::name ( ) const [virtual]
 

IOODataBase implementation: Object's name.

Reimplemented from IOODataBase.

Definition at line 118 of file DbImplementation.cpp.

Referenced by setProperties().

DbResult OODataBaseImplementation::prepareLink ( const dbObjectHandle< DbObject >& objH,
dbHandle< DbLink >& linkH,
void * gen ) [virtual]
 

IOODataBase implementation: Prepare link between objects.

Reimplemented from IOODataBase.

Definition at line 261 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::queryInterface ( const IID & riid,
void ** ppvInterface ) [virtual]
 

IInterface implementation: Query interface.

Definition at line 100 of file DbImplementation.cpp.

unsigned long OODataBaseImplementation::release ( ) [virtual]
 

IInterface implementation: Decrease reference count.

Definition at line 91 of file DbImplementation.cpp.

const std::string & OODataBaseImplementation::server ( ) const [virtual]
 

IOODataBase implementation: Database server's name.

Reimplemented from IOODataBase.

Definition at line 138 of file DbImplementation.cpp.

void OODataBaseImplementation::setDriver ( const std::string & drv ) [virtual]
 

IOODataBase implementation: Set the name of the driver's implementation.

Reimplemented from IOODataBase.

Definition at line 133 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::setProperties ( ) [virtual]
 

Definition at line 306 of file DbImplementation.cpp.

Referenced by initialize().

StatusCode OODataBaseImplementation::setProperty ( const std::string & n,
const std::string & v ) [virtual]
 

Implementation of IProperty::setProperty.

Definition at line 285 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::setProperty ( std::istream & s ) [virtual]
 

Implementation of IProperty::setProperty.

Definition at line 281 of file DbImplementation.cpp.

StatusCode OODataBaseImplementation::setProperty ( const Property & p ) [virtual]
 

Definition at line 277 of file DbImplementation.cpp.

void OODataBaseImplementation::setServer ( const std::string & srv ) [virtual]
 

IOODataBase implementation: Set the name of the database server host.

Reimplemented from IOODataBase.

Definition at line 143 of file DbImplementation.cpp.

unsigned char OODataBaseImplementation::type ( ) const [virtual]
 

IOODataBase implementation: Access to OODataBase type.

Reimplemented from IOODataBase.

Definition at line 123 of file DbImplementation.cpp.

DbTypeInfo * OODataBaseImplementation::typeInfo ( const std::string & name ) [virtual]
 

IOODataBase implementation: Retrieve type information.

Reimplemented from IOODataBase.

Definition at line 176 of file DbImplementation.cpp.

const DbTypeInfo * OODataBaseImplementation::typeInfo ( const std::string & name ) const [virtual]
 

IOODataBase implementation: Retrieve type information (CONST).

Reimplemented from IOODataBase.

Definition at line 167 of file DbImplementation.cpp.

Referenced by addTypeInfo().


Member Data Documentation

std::string OODataBaseImplementation::m_defPType [protected]
 

Default persistent object type.

Definition at line 114 of file DbImplementation.h.

std::string OODataBaseImplementation::m_defTType [protected]
 

Default transient object type.

Definition at line 112 of file DbImplementation.h.

std::string OODataBaseImplementation::m_driver [protected]
 

Driver's name.

Definition at line 108 of file DbImplementation.h.

IMessageSvc * OODataBaseImplementation::m_messageSvc [protected]
 

Reference to message service.

Definition at line 118 of file DbImplementation.h.

std::string OODataBaseImplementation::m_name [mutable, protected]
 

Object name.

Definition at line 106 of file DbImplementation.h.

IObjManager * OODataBaseImplementation::m_objMgr [protected]
 

Reference to the object manager.

Definition at line 122 of file DbImplementation.h.

PropertyMgr * OODataBaseImplementation::m_propertyMgr [protected]
 

Reference to proprty manager.

Definition at line 120 of file DbImplementation.h.

long OODataBaseImplementation::m_refCount [protected]
 

Reference counter.

Definition at line 102 of file DbImplementation.h.

std::string OODataBaseImplementation::m_server [protected]
 

Driver's name.

Definition at line 110 of file DbImplementation.h.

ISvcLocator * OODataBaseImplementation::m_svcLocator [protected]
 

Reference to service locator object.

Definition at line 116 of file DbImplementation.h.

unsigned char OODataBaseImplementation::m_type [protected]
 

Type the implementation belongs to.

Definition at line 104 of file DbImplementation.h.

DataTypes OODataBaseImplementation::m_types [private]
 

Definition at line 99 of file DbImplementation.h.


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