Gaudi Framework, version v21r9

Home   Generated: 3 May 2010

PoolDbDataObjectHandler Class Reference

Inheritance diagram for PoolDbDataObjectHandler:

Inheritance graph
[legend]
Collaboration diagram for PoolDbDataObjectHandler:

Collaboration graph
[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::DataCallBackclone () 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

LinkManagerm_links
PoolDbLinkManagerm_refs
PoolDbBaseCnvm_converter
IRegistrym_registry


Detailed Description

Definition at line 90 of file PoolDbBaseCnv.cpp.


Constructor & Destructor Documentation

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

Initializing constructor.

Definition at line 98 of file PoolDbBaseCnv.cpp.

00099   : pool::DbObjectCallBack(cl), m_links(0), m_refs(0),
00100     m_converter(0), m_registry(0)
00101   {
00102   }

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

Initializing constructor.

Definition at line 104 of file PoolDbBaseCnv.cpp.

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

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

Standard destructor.

Definition at line 112 of file PoolDbBaseCnv.cpp.

00112                                      {
00113   }


Member Function Documentation

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

Virtual copy.

Reimplemented from pool::DbObjectCallBack.

Definition at line 115 of file PoolDbBaseCnv.cpp.

00115                                           {
00116     if ( s_context )  {
00117       PoolDbDataObjectHandler* p =
00118         new PoolDbDataObjectHandler( transientType(),
00119                                      s_context->cnv(),
00120                                      s_context->registry());
00121       p->setShape(shape());
00122       return p;
00123     }
00124     PoolDbDataObjectHandler* p =
00125            new PoolDbDataObjectHandler(transientType(),0,0);
00126     p->setShape(shape());
00127     return p;
00128   }

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

00222 {
00223   m_refs = 0;
00224   *context = 0;
00225   switch(action_type)  {
00226   case GET:
00227     m_objectData = 0;
00228     break;
00229   case PUT:
00230     break;
00231   }
00232   void **ptr = const_cast<void**>(&m_objectData);
00233   pushCurrentDataObject((DataObject**)ptr);
00234   return pool::Success;
00235 }

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

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

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

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


Member Data Documentation

Definition at line 92 of file PoolDbBaseCnv.cpp.

Definition at line 93 of file PoolDbBaseCnv.cpp.

Definition at line 94 of file PoolDbBaseCnv.cpp.

Definition at line 95 of file PoolDbBaseCnv.cpp.


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

Generated at Mon May 3 12:25:58 2010 for Gaudi Framework, version v21r9 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004