![]() |
|
|
Generated: 18 Jul 2008 |


Definition at line 82 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) | |||
| ||||
| 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 | |||
| PoolDbDataObjectHandler::PoolDbDataObjectHandler | ( | const ROOT::Reflex::Type & | cl | ) | [inline] |
Initializing constructor.
Definition at line 90 of file PoolDbBaseCnv.cpp.
Referenced by clone().
00091 : pool::DbObjectCallBack(cl), m_links(0), m_refs(0), 00092 m_converter(0), m_registry(0) 00093 { 00094 }
| PoolDbDataObjectHandler::PoolDbDataObjectHandler | ( | const ROOT::Reflex::Type & | cl, | |
| PoolDbBaseCnv * | dm, | |||
| IRegistry * | pReg | |||
| ) | [inline] |
Initializing constructor.
Definition at line 96 of file PoolDbBaseCnv.cpp.
00099 : pool::DbObjectCallBack(cl), m_links(0), m_refs(0), 00100 m_converter(dm), m_registry(pReg) 00101 { 00102 }
| virtual PoolDbDataObjectHandler::~PoolDbDataObjectHandler | ( | ) | [inline, virtual] |
| virtual pool::DataCallBack* PoolDbDataObjectHandler::clone | ( | ) | const [inline, virtual] |
Virtual copy.
Reimplemented from pool::DbObjectCallBack.
Definition at line 107 of file PoolDbBaseCnv.cpp.
References PoolDbObjectContext::cnv(), PoolDbDataObjectHandler(), PoolDbObjectContext::registry(), s_context, pool::DbObjectCallBack::setShape(), pool::DbObjectCallBack::shape(), and pool::DbObjectCallBack::transientType().
00107 { 00108 if ( s_context ) { 00109 PoolDbDataObjectHandler* p = 00110 new PoolDbDataObjectHandler( transientType(), 00111 s_context->cnv(), 00112 s_context->registry()); 00113 p->setShape(shape()); 00114 return p; 00115 } 00116 PoolDbDataObjectHandler* p = 00117 new PoolDbDataObjectHandler(transientType(),0,0); 00118 p->setShape(shape()); 00119 return p; 00120 }
| pool::DbStatus PoolDbDataObjectHandler::start | ( | pool::DataCallBack::CallType | action_type, | |
| void * | data, | |||
| void ** | context | |||
| ) | [virtual] |
| action_type | [IN] Action type: PUT/GET |
| data | [IN] Reference to persistent data location (on Write) | |
| context | [IN] Data context for subsequent calls |
Reimplemented from pool::DbObjectCallBack.
Definition at line 211 of file PoolDbBaseCnv.cpp.
References pool::DataCallBack::GET, pool::DbObjectCallBack::m_objectData, m_refs, pushCurrentDataObject(), pool::DataCallBack::PUT, and pool::Success.
00214 { 00215 m_refs = 0; 00216 *context = 0; 00217 switch(action_type) { 00218 case GET: 00219 m_objectData = 0; 00220 break; 00221 case PUT: 00222 break; 00223 } 00224 void **ptr = const_cast<void**>(&m_objectData); 00225 pushCurrentDataObject((DataObject**)ptr); 00226 return pool::Success; 00227 }
| 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 153 of file PoolDbBaseCnv.cpp.
References PoolDbBaseCnv::createReferences(), pool::Error, pool::DataCallBack::GET, DataObject::linkMgr(), m_converter, m_links, pool::DbObjectCallBack::m_objectData, m_refs, pool::DataCallBack::PUT, and pool::Success.
00158 { 00159 DataObject* pObj = (DataObject*)m_objectData; 00160 switch(action_type) { 00161 case GET: 00162 switch(col_number) { 00163 case 0: 00164 *data_pointer = &m_objectData; 00165 return pool::Success; 00166 case 1: 00167 *data_pointer = &m_links; 00168 return pool::Success; 00169 case 2: 00170 *data_pointer = &m_refs; 00171 return pool::Success; 00172 } 00173 00174 case PUT: 00175 switch(col_number) { 00176 case 0: 00177 *data_pointer = pObj; 00178 return pool::Success; 00179 case 1: 00180 *data_pointer = pObj->linkMgr(); 00181 return pool::Success; 00182 case 2: 00183 m_refs = m_converter->createReferences(pObj); 00184 *data_pointer = m_refs; 00185 return pool::Success; 00186 } 00187 } 00188 return pool::Error; 00189 }
| pool::DbStatus PoolDbDataObjectHandler::end | ( | pool::DataCallBack::CallType | action_type, | |
| void * | context | |||
| ) | [virtual] |
Callback when a read/write sequence should is finished.
Reimplemented from pool::DbObjectCallBack.
Definition at line 193 of file PoolDbBaseCnv.cpp.
References pool::deletePtr(), PoolDbBaseCnv::dumpReferences(), pool::DataCallBack::GET, StatusCode::ignore(), m_converter, m_links, pool::DbObjectCallBack::m_objectData, m_refs, m_registry, popCurrentDataObject(), pool::DataCallBack::PUT, PoolDbBaseCnv::setReferences(), and pool::Success.
00194 { 00195 DataObject* pObj = (DataObject*)m_objectData; 00196 switch(action_type) { 00197 case GET: 00198 m_converter->setReferences(m_refs, m_links, pObj, m_registry).ignore(); 00199 pool::deletePtr(m_links); 00200 break; 00201 case PUT: 00202 m_converter->dumpReferences(m_refs, m_links, pObj, m_registry).ignore(); 00203 break; 00204 } 00205 pool::deletePtr(m_refs); 00206 popCurrentDataObject(); 00207 return pool::Success; 00208 }
LinkManager* PoolDbDataObjectHandler::m_links [protected] |
PoolDbLinkManager* PoolDbDataObjectHandler::m_refs [protected] |
PoolDbBaseCnv* PoolDbDataObjectHandler::m_converter [protected] |
IRegistry* PoolDbDataObjectHandler::m_registry [protected] |