| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

Public Member Functions | Protected Attributes

# PoolDbDataObjectHandler Class Reference

Inheritance diagram for PoolDbDataObjectHandler:
[legend]
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.

      : pool::DbObjectCallBack(cl), m_links(0), m_refs(0),
        m_converter(0), m_registry(0)
      {
      }

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

Initializing constructor.

Definition at line 118 of file PoolDbBaseCnv.cpp.

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

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

Standard destructor.

Definition at line 126 of file PoolDbBaseCnv.cpp.

                                         {
      }

## 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
| ) |  | `[virtual]`

Callback to retrieve the absolute address of a column.

Reimplemented from pool::DbObjectCallBack.

Definition at line 175 of file PoolDbBaseCnv.cpp.

    {
      DataObject* pObj = (DataObject*)m_objectData;
      switch(action_type)  {
      case GET:
        switch(col_number) {
        case 0:
          *data_pointer = &m_objectData;
          return pool::Success;
        case 1:
          *data_pointer = &m_links;
          return pool::Success;
        case 2:
          *data_pointer = &m_refs;
          return pool::Success;
        }
        break;
      case PUT:
        switch(col_number) {
        case 0:
          *data_pointer = pObj;
          return pool::Success;
        case 1:
          *data_pointer = pObj->linkMgr();
          return pool::Success;
        case 2:
          m_refs = m_converter->createReferences(pObj);
          *data_pointer = m_refs;
          return pool::Success;
        }
        break;
      default:
        break;
      }
      return pool::Error;
    }

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

Virtual copy.

Reimplemented from pool::DbObjectCallBack.

Definition at line 129 of file PoolDbBaseCnv.cpp.

                                              {
        if ( s_context )  {
          PoolDbDataObjectHandler* p =
            new PoolDbDataObjectHandler( transientType(),
                                         s_context->cnv(),
                                         s_context->registry());
          p->setShape(shape());
          return p;
        }
        PoolDbDataObjectHandler* p =
               new PoolDbDataObjectHandler(transientType(),0,0);
        p->setShape(shape());
        return p;
      }

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 218 of file PoolDbBaseCnv.cpp.

    {
      DataObject* pObj = (DataObject*)m_objectData;
      switch(action_type)  {
      case GET:
        m_converter->setReferences(m_refs, m_links, pObj, m_registry).ignore();
        pool::deletePtr(m_links);
        break;
      case PUT:
        m_converter->dumpReferences(m_refs, m_links, pObj, m_registry).ignore();
        break;
      }
      pool::deletePtr(m_refs);
      popCurrentDataObject();
      return pool::Success;
    }

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 236 of file PoolDbBaseCnv.cpp.

    {
      m_refs = 0;
      *context = 0;
      switch(action_type)  {
      case GET:
        m_objectData = 0;
        break;
      case PUT:
        break;
      }
      void **ptr = const_cast<void**>(&m_objectData);
      pushCurrentDataObject((DataObject**)ptr);
      return pool::Success;
    }

## 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_v22r2/GaudiPoolDb/src/PoolDbBaseCnv.cpp

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