| # Gaudi Framework, version v20r4
Generated: 8 Jan 2009

# PoolDbDataObjectHandler Class Reference

Inheritance diagram for PoolDbDataObjectHandler:

[legend]
Collaboration diagram for PoolDbDataObjectHandler:

[legend]

List of all members.

## Detailed Description

Definition at line 85 of file PoolDbBaseCnv.cpp.

## Public Member Functions
| PoolDbDataObjectHandler (const ROOT::Reflex::Type &cl)
| Initializing constructor.
| PoolDbDataObjectHandler (const ROOT::Reflex::Type &cl, PoolDbBaseCnv *dm, IRegistry *pReg)
| Initializing constructor.
virtual | ~PoolDbDataObjectHandler ()
| Standard destructor.
virtual pool::DataCallBack * | clone () const
| Virtual copy.
pool::DbStatus | start (pool::DataCallBack::CallType action_type, void *data, void **context)
| Callback when a read/write sequence should be started.
pool::DbStatus | bind (pool::DataCallBack::CallType action_type, const pool::DbColumn *col_ident, int col_number, void *context, void **data_pointer)
| Callback to retrieve the absolute address of a column.
pool::DbStatus | end (pool::DataCallBack::CallType action_type, void *context)
| Callback when a read/write sequence should is finished.
## Protected Attributes
LinkManager * | m_links
PoolDbLinkManager * | m_refs
PoolDbBaseCnv * | m_converter
IRegistry * | m_registry

## Constructor & Destructor Documentation

PoolDbDataObjectHandler::PoolDbDataObjectHandler | ( | const ROOT::Reflex::Type & | cl | ) | `[inline]`

Initializing constructor.

Definition at line 93 of file PoolDbBaseCnv.cpp.

    00094   : pool::DbObjectCallBack(cl), m_links(0), m_refs(0),
    00095     m_converter(0), m_registry(0)
    00096   {
    00097   }

PoolDbDataObjectHandler::PoolDbDataObjectHandler | ( | const ROOT::Reflex::Type & | cl,
|  | PoolDbBaseCnv * | dm,
|  | IRegistry * | pReg |
| ) |  |  | `[inline]`

Initializing constructor.

Definition at line 99 of file PoolDbBaseCnv.cpp.

    00102   : pool::DbObjectCallBack(cl), m_links(0), m_refs(0),
    00103     m_converter(dm), m_registry(pReg)
    00104   {
    00105   }

virtual PoolDbDataObjectHandler::~PoolDbDataObjectHandler | ( |  | ) | `[inline, virtual]`

Standard destructor.

Definition at line 107 of file PoolDbBaseCnv.cpp.

    00107                                      {
    00108   }

## Member Function Documentation

virtual pool::DataCallBack* PoolDbDataObjectHandler::clone | ( | void |  | ) | const`[inline, virtual]`

Virtual copy.

Reimplemented from pool::DbObjectCallBack.

Definition at line 110 of file PoolDbBaseCnv.cpp.

    00110                                           {
    00111     if ( s_context )  {
    00112       PoolDbDataObjectHandler* p =
    00113         new PoolDbDataObjectHandler( transientType(),
    00114                                      s_context->cnv(),
    00115                                      s_context->registry());
    00116       p->setShape(shape());
    00117       return p;
    00118     }
    00119     PoolDbDataObjectHandler* p =
    00120            new PoolDbDataObjectHandler(transientType(),0,0);
    00121     p->setShape(shape());
    00122     return p;
    00123   }

pool::DbStatus PoolDbDataObjectHandler::start | ( | pool::DataCallBack::CallType | action_type,
|  | void * | data,
|  | void ** | context |
| ) |  |  | `[virtual]`

Callback when a read/write sequence should be started.

Parameters:

  | action_type | [IN] Action type: PUT/GET
  | data | [IN] Reference to persistent data location (on Write)
  | context | [IN] Data context for subsequent calls

Returns:
  DbStatus indicating success or failure.

Reimplemented from pool::DbObjectCallBack.

Definition at line 214 of file PoolDbBaseCnv.cpp.

    00217 {
    00218   m_refs = 0;
    00219   *context = 0;
    00220   switch(action_type)  {
    00221   case GET:
    00222     m_objectData = 0;
    00223     break;
    00224   case PUT:
    00225     break;
    00226   }
    00227   void **ptr = const_cast<void**>(&m_objectData);
    00228   pushCurrentDataObject((DataObject**)ptr);
    00229   return pool::Success;
    00230 }

pool::DbStatus PoolDbDataObjectHandler::bind | ( | pool::DataCallBack::CallType | action_type,
|  | const pool::DbColumn * | col_ident,
|  | int | col_number,
|  | void * | context,
|  | void ** | data_pointer |
| ) |  |  | `[virtual]`

Callback to retrieve the absolute address of a column.

Reimplemented from pool::DbObjectCallBack.

Definition at line 156 of file PoolDbBaseCnv.cpp.

    00161 {
    00162   DataObject* pObj = (DataObject*)m_objectData;
    00163   switch(action_type)  {
    00164   case GET:
    00165     switch(col_number) {
    00166     case 0:
    00167       *data_pointer = &m_objectData;
    00168       return pool::Success;
    00169     case 1:
    00170       *data_pointer = &m_links;
    00171       return pool::Success;
    00172     case 2:
    00173       *data_pointer = &m_refs;
    00174       return pool::Success;
    00175     }
    00176
    00177   case PUT:
    00178     switch(col_number) {
    00179     case 0:
    00180       *data_pointer = pObj;
    00181       return pool::Success;
    00182     case 1:
    00183       *data_pointer = pObj->linkMgr();
    00184       return pool::Success;
    00185     case 2:
    00186       m_refs = m_converter->createReferences(pObj);
    00187       *data_pointer = m_refs;
    00188       return pool::Success;
    00189     }
    00190   }
    00191   return pool::Error;
    00192 }

pool::DbStatus PoolDbDataObjectHandler::end | ( | pool::DataCallBack::CallType | action_type,
|  | void * | context |
| ) |  |  | `[virtual]`

Callback when a read/write sequence should is finished.

Callback when a read sequence should be started.

Reimplemented from pool::DbObjectCallBack.

Definition at line 196 of file PoolDbBaseCnv.cpp.

    00197 {
    00198   DataObject* pObj = (DataObject*)m_objectData;
    00199   switch(action_type)  {
    00200   case GET:
    00201     m_converter->setReferences(m_refs, m_links, pObj, m_registry).ignore();
    00202     pool::deletePtr(m_links);
    00203     break;
    00204   case PUT:
    00205     m_converter->dumpReferences(m_refs, m_links, pObj, m_registry).ignore();
    00206     break;
    00207   }
    00208   pool::deletePtr(m_refs);
    00209   popCurrentDataObject();
    00210   return pool::Success;
    00211 }

## Member Data Documentation

LinkManager* PoolDbDataObjectHandler::m_links`[protected]`

Definition at line 87 of file PoolDbBaseCnv.cpp.

PoolDbLinkManager* PoolDbDataObjectHandler::m_refs`[protected]`

Definition at line 88 of file PoolDbBaseCnv.cpp.

PoolDbBaseCnv* PoolDbDataObjectHandler::m_converter`[protected]`

Definition at line 89 of file PoolDbBaseCnv.cpp.

IRegistry* PoolDbDataObjectHandler::m_registry`[protected]`

Definition at line 90 of file PoolDbBaseCnv.cpp.

The documentation for this class was generated from the following file:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v20r4/GaudiPoolDb/src/PoolDbBaseCnv.cpp