|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #ifndef POOL_DBOBJECT_H
16 #define POOL_DBOBJECT_H 1
30 class DbObjectAccessor;
33 typedef const class Shape *
ShapeH;
60 void*
operator new(
size_t size);
62 void operator delete(
void*
ptr);
64 void*
operator new(
size_t siz, DbContainer& cntH);
66 void operator delete(
void *
ptr, DbContainer& cntH);
90 template <
class USER>
class DbObjectHandle :
public DbHandleBase<USER> {
94 const USER*
makePtr(
void*
p) {
return (
const USER*)(
p); }
124 {
_set(
c.ptr(),
c.type()); }
180 template <
typename T>
188 #ifndef POOL_HAVE_BASE
204 template <
class T>
inline
206 {
return DbObjectAccessor::containedIn(
Base::ptr()); }
209 template <
class T>
inline
211 {
return DbObjectAccessor::objectOid(
Base::ptr()); }
214 template <
class T>
inline
216 {
return DbObjectAccessor::objectOid(
Base::ptr()); }
219 template <
class T>
inline
221 {
return DbObjectAccessor::makeObjectLink(
Base::ptr(), pToken, linkH); }
225 #endif // POOL_DBOBJECT_H
DbHandle()
Default constructor.
Token::OID_t & oid()
Access object oid.
DbObjectHandle< USER > Handle
ElementLink< T > makeLink(const SG::View *view, const SG::ReadHandle< T > &handle, size_t index)
Create EL to a collection in view.
DbHandle(const DbObjectHandle< T > &c)
Copy constructor.
DbObjectHandle< USER > & operator=(const int)
Generic assignment operator.
DbHandle(const DbType &typ)
Constructor with storage type.
DbHandle< USER > & operator=(DbObjectHandle< T > &c)
Generic assignment operator.
DbObjectHandle< USER > & operator=(const DbObjectHandle &c)
const DbType & type() const
Inquire storage type of the handle.
DbHandle(USER *obj)
Constructor with object assignment.
DbObjectHandle()
Standard Constructor.
This class provides a token that identifies in a unique way objects on the persistent storage.
bool operator==(const DbHandleBase< T > &objH) const
Equality operator.
const USER * makePtr(void *p)
Pointer conversion.
const class Shape * ShapeH
DbHandle(const DbHandle< USER > &c)
Copy constructor.
void _setType(const DbType &type)
Set handle type.
const T * ptr() const
Access to underlying object.
void _setObject(const int)
DbStatus makeLink ATLAS_NOT_THREAD_SAFE(const Token *pToken, Token::OID_t &linkH) const
Add persistent association entry.
void _setObject(T *p)
Set object value.
DbHandle< USER > & operator=(DbHandle< USER > &c)
Generic assignment operator.
const DbContainer & containedIn() const
Retrieve hosting container.
virtual ~DbObjectHandle()
Standard destructor.
void setType(const DbType &typ)
Set handle type.
const Token::OID_t & oid() const
Access object oid.
DbObjectHandle(USER *p)
Constructor with object pointer.
DbHandle< USER > & operator=(USER *obj)
Generic assignment operator.
T * m_ptr
Data member: Object pointer. Sub-classes need access on re-assignment.
DbStatus DbObjectHandle< T >::makeLink ATLAS_NOT_THREAD_SAFE(const Token *pToken, Token::OID_t &linkH) const
Add persistent association entry.
DbObjectHandle(const DbType &typ)
Constructor with storage type.
virtual ~DbHandle()
Standard destructor.
DbObjectHandle(const DbObjectHandle< USER > &c)
Copy constructor.
void _set(const T *ptr, const DbType &typ)
Attach object to handle with type: may be accessed by sub-class only.
Define macros for attributes used to control the static checker.
This file contains the class definition for the Token class (migrated from POOL).
DbHandleBase< USER > Base