| # Gaudi Framework, version v22r0 |

Home |  | Generated: 9 Feb 2011

# PoolDbDataObjectHandler Class Reference

Collaboration diagram for PoolDbDataObjectHandler:
[legend]

List of all members.

## 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

## Detailed Description

Definition at line 104 of file PoolDbBaseCnv.cpp.

## Constructor & Destructor Documentation

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

Initializing constructor.

Definition at line 112 of file PoolDbBaseCnv.cpp.

    00113   : pool::DbObjectCallBack(cl), m_links(0), m_refs(0),
    00114     m_converter(0), m_registry(0)
    00115   {
    00116   }

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

Initializing constructor.

Definition at line 118 of file PoolDbBaseCnv.cpp.

    00121   : pool::DbObjectCallBack(cl), m_links(0), m_refs(0),
    00122     m_converter(dm), m_registry(pReg)
    00123   {
    00124   }

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

Standard destructor.

Definition at line 126 of file PoolDbBaseCnv.cpp.

    00126                                      {
    00127   }

## Member Function Documentation

pool::DbStatus PoolDbDataObjectHandler::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.

Definition at line 175 of file PoolDbBaseCnv.cpp.

    00180 {
    00181   DataObject* pObj = (DataObject*)m_objectData;
    00182   switch(action_type)  {
    00183   case GET:
    00184     switch(col_number) {
    00185     case 0:
    00186       *data_pointer = &m_objectData;
    00187       return pool::Success;
    00188     case 1:
    00189       *data_pointer = &m_links;
    00190       return pool::Success;
    00191     case 2:
    00192       *data_pointer = &m_refs;
    00193       return pool::Success;
    00194     }
    00195     break;
    00196   case PUT:
    00197     switch(col_number) {
    00198     case 0:
    00199       *data_pointer = pObj;
    00200       return pool::Success;
    00201     case 1:
    00202       *data_pointer = pObj->linkMgr();
    00203       return pool::Success;
    00204     case 2:
    00205       m_refs = m_converter->createReferences(pObj);
    00206       *data_pointer = m_refs;
    00207       return pool::Success;
    00208     }
    00209     break;
    00210   default:
    00211     break;
    00212   }
    00213   return pool::Error;
    00214 }

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

Virtual copy.

Definition at line 129 of file PoolDbBaseCnv.cpp.

    00129                                           {
    00130     if ( s_context )  {
    00131       PoolDbDataObjectHandler* p =
    00132         new PoolDbDataObjectHandler( transientType(),
    00133                                      s_context->cnv(),
    00134                                      s_context->registry());
    00135       p->setShape(shape());
    00136       return p;
    00137     }
    00138     PoolDbDataObjectHandler* p =
    00139            new PoolDbDataObjectHandler(transientType(),0,0);
    00140     p->setShape(shape());
    00141     return p;
    00142   }

pool::DbStatus PoolDbDataObjectHandler::end | ( | pool::DataCallBack::CallType | action_type,
|  | void * | context |
| ) |  |  |

Callback when a read/write sequence should is finished.

Callback when a read sequence should be started.

Definition at line 218 of file PoolDbBaseCnv.cpp.

    00219 {
    00220   DataObject* pObj = (DataObject*)m_objectData;
    00221   switch(action_type)  {
    00222   case GET:
    00223     m_converter->setReferences(m_refs, m_links, pObj, m_registry).ignore();
    00224     pool::deletePtr(m_links);
    00225     break;
    00226   case PUT:
    00227     m_converter->dumpReferences(m_refs, m_links, pObj, m_registry).ignore();
    00228     break;
    00229   }
    00230   pool::deletePtr(m_refs);
    00231   popCurrentDataObject();
    00232   return pool::Success;
    00233 }

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

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.

Definition at line 236 of file PoolDbBaseCnv.cpp.

    00239 {
    00240   m_refs = 0;
    00241   *context = 0;
    00242   switch(action_type)  {
    00243   case GET:
    00244     m_objectData = 0;
    00245     break;
    00246   case PUT:
    00247     break;
    00248   }
    00249   void **ptr = const_cast<void**>(&m_objectData);
    00250   pushCurrentDataObject((DataObject**)ptr);
    00251   return pool::Success;
    00252 }

## Member Data Documentation

PoolDbBaseCnv* PoolDbDataObjectHandler::m_converter`[protected]`

Definition at line 108 of file PoolDbBaseCnv.cpp.

LinkManager* PoolDbDataObjectHandler::m_links`[protected]`

Definition at line 106 of file PoolDbBaseCnv.cpp.

PoolDbLinkManager* PoolDbDataObjectHandler::m_refs`[protected]`

Definition at line 107 of file PoolDbBaseCnv.cpp.

IRegistry* PoolDbDataObjectHandler::m_registry`[protected]`

Definition at line 109 of file PoolDbBaseCnv.cpp.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines