ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | List of all members
pool::DbHandle< USER > Class Template Reference

#include <DbObject.h>

Inheritance diagram for pool::DbHandle< USER >:
Collaboration diagram for pool::DbHandle< USER >:

Public Member Functions

virtual ~DbHandle ()
 Standard destructor. More...
 
 DbHandle ()
 Default constructor. More...
 
 DbHandle (const DbType &typ)
 Constructor with storage type. More...
 
 DbHandle (USER *obj)
 Constructor with object assignment. More...
 
template<typename T >
 DbHandle (const DbObjectHandle< T > &c)
 Copy constructor. More...
 
 DbHandle (const DbHandle< USER > &c)
 Copy constructor. More...
 
DbHandle< USER > & operator= (DbHandle< USER > &c)
 Generic assignment operator. More...
 
DbHandle< USER > & operator= (USER *obj)
 Generic assignment operator. More...
 
template<typename T >
DbHandle< USER > & operator= (DbObjectHandle< T > &c)
 Generic assignment operator. More...
 
void _setType (const DbType &type)
 Set handle type. More...
 
void _setObject (T *p)
 Set object value. More...
 
void _setObject (const int)
 
 operator const USER * () const
 Generic assignment operator from base class. More...
 
 operator USER * ()
 
bool operator== (const DbHandleBase< T > &objH) const
 Equality operator. More...
 
const DbContainercontainedIn () const
 Retrieve hosting container. More...
 
const Token::OID_toid () const
 Access object oid. More...
 
Token::OID_toid ()
 Access object oid. More...
 
DbStatus makeLink ATLAS_NOT_THREAD_SAFE (const Token *pToken, Token::OID_t &linkH) const
 Add persistent association entry. More...
 

Protected Member Functions

void _set (const T *ptr, const DbType &typ)
 Attach object to handle with type: may be accessed by sub-class only. More...
 

Private Types

typedef DbObjectHandle< USER > Handle
 
typedef DbHandleBase< USER > Base
 

Private Member Functions

const USER * makePtr (void *p)
 Pointer conversion. More...
 

Detailed Description

template<class USER>
class pool::DbHandle< USER >

Definition at line 151 of file DbObject.h.

Member Typedef Documentation

◆ Base

typedef DbHandleBase<USER> pool::DbObjectHandle::Base
privateinherited

Definition at line 92 of file DbObject.h.

◆ Handle

template<class USER >
typedef DbObjectHandle< USER> pool::DbHandle< USER >::Handle
private

Definition at line 152 of file DbObject.h.

Constructor & Destructor Documentation

◆ ~DbHandle()

template<class USER >
virtual pool::DbHandle< USER >::~DbHandle ( )
inlinevirtual

Standard destructor.

Definition at line 155 of file DbObject.h.

155 { }

◆ DbHandle() [1/5]

template<class USER >
pool::DbHandle< USER >::DbHandle ( )
inline

Default constructor.

Definition at line 157 of file DbObject.h.

157 { }

◆ DbHandle() [2/5]

template<class USER >
pool::DbHandle< USER >::DbHandle ( const DbType typ)
inline

Constructor with storage type.

Definition at line 159 of file DbObject.h.

159 { Handle::_setType(typ); }

◆ DbHandle() [3/5]

template<class USER >
pool::DbHandle< USER >::DbHandle ( USER *  obj)
inline

Constructor with object assignment.

Definition at line 161 of file DbObject.h.

◆ DbHandle() [4/5]

template<class USER >
template<typename T >
pool::DbHandle< USER >::DbHandle ( const DbObjectHandle< T > &  c)
inline

Copy constructor.

Definition at line 163 of file DbObject.h.

164  : DbObjectHandle<USER>()
165  { Handle::_set(c.ptr(),c.type()); }

◆ DbHandle() [5/5]

template<class USER >
pool::DbHandle< USER >::DbHandle ( const DbHandle< USER > &  c)
inline

Copy constructor.

Definition at line 167 of file DbObject.h.

167  : DbObjectHandle<USER>()
168  { Handle::_set(c.ptr(),c.type()); }

Member Function Documentation

◆ _set()

void pool::DbObjectHandle::_set ( const T *  ptr,
const DbType typ 
)
inlineprotectedinherited

Attach object to handle with type: may be accessed by sub-class only.

Definition at line 97 of file DbObject.h.

97  {
98  _setObject(ptr);
99  _setType(typ);
100  }

◆ _setObject() [1/2]

void pool::DbObjectHandle::_setObject ( const int  )
inlineinherited

Definition at line 109 of file DbObject.h.

109  {
110  if ( 0 == Base::ptr() ) return;
111  Base::m_ptr = 0;
112  }

◆ _setObject() [2/2]

void pool::DbObjectHandle::_setObject ( T *  p)
inlineinherited

Set object value.

Definition at line 105 of file DbObject.h.

105  {
106  if ( 0 == Base::ptr() && 0 == p ) return;
107  Base::m_ptr = p;
108  }

◆ _setType()

void pool::DbObjectHandle::_setType ( const DbType type)
inlineinherited

Set handle type.

Definition at line 103 of file DbObject.h.

103 { Base::setType(type); }

◆ ATLAS_NOT_THREAD_SAFE()

DbStatus makeLink pool::DbObjectHandle::ATLAS_NOT_THREAD_SAFE ( const Token pToken,
Token::OID_t linkH 
) const
inherited

Add persistent association entry.

◆ containedIn()

const DbContainer & pool::DbObjectHandle::containedIn
inlineinherited

Retrieve hosting container.

Definition at line 141 of file DbObject.h.

206  { return DbObjectAccessor::containedIn(Base::ptr()); }

◆ makePtr()

const USER* pool::DbObjectHandle::makePtr ( void *  p)
inlineprivateinherited

Pointer conversion.

Definition at line 94 of file DbObject.h.

94 { return (const USER*)(p); }

◆ oid() [1/2]

Token::OID_t & pool::DbObjectHandle::oid
inlineinherited

Access object oid.

Definition at line 145 of file DbObject.h.

211  { return DbObjectAccessor::objectOid(Base::ptr()); }

◆ oid() [2/2]

const Token::OID_t & pool::DbObjectHandle::oid
inlineinherited

Access object oid.

Definition at line 143 of file DbObject.h.

216  { return DbObjectAccessor::objectOid(Base::ptr()); }

◆ operator const USER *()

pool::DbObjectHandle::operator const USER *
inlineinherited

Generic assignment operator from base class.

Definition at line 126 of file DbObject.h.

126 { return Base::ptr(); }

◆ operator USER *()

pool::DbObjectHandle::operator USER *
inlineinherited

Definition at line 127 of file DbObject.h.

127 { return Base::ptr(); }

◆ operator=() [1/3]

template<class USER >
DbHandle<USER>& pool::DbHandle< USER >::operator= ( DbHandle< USER > &  c)
inline

Generic assignment operator.

Definition at line 170 of file DbObject.h.

170  {
171  if ( this != &c ) Handle::_set(c.ptr(),c.type());
172  return *this;
173  }

◆ operator=() [2/3]

template<class USER >
template<typename T >
DbHandle<USER>& pool::DbHandle< USER >::operator= ( DbObjectHandle< T > &  c)
inline

Generic assignment operator.

Definition at line 181 of file DbObject.h.

181  {
182  if ( Handle::ptr() != c.ptr() ) Handle::_set(c.ptr(), c.type());
183  return *this;
184  }

◆ operator=() [3/3]

template<class USER >
DbHandle<USER>& pool::DbHandle< USER >::operator= ( USER *  obj)
inline

Generic assignment operator.

Definition at line 175 of file DbObject.h.

175  {
176  if ( Handle::ptr() != obj ) Handle::_setObject(obj);
177  return *this;
178  }

◆ operator==()

bool pool::DbObjectHandle::operator== ( const DbHandleBase< T > &  objH) const
inlineinherited

Equality operator.

Definition at line 138 of file DbObject.h.

139  { return Base::type() == objH.type() && Base::ptr() == objH.ptr(); }

The documentation for this class was generated from the following file:
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
pool::DbObjectHandle< USER >::_setType
void _setType(const DbType &type)
Set handle type.
Definition: DbObject.h:103
pool::DbObjectHandle< USER >::_setObject
void _setObject(T *p)
Set object value.
Definition: DbObject.h:105
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
pool::DbObjectHandle< USER >::_set
void _set(const T *ptr, const DbType &typ)
Attach object to handle with type: may be accessed by sub-class only.
Definition: DbObject.h:97
python.PyAthena.obj
obj
Definition: PyAthena.py:135
python.compressB64.c
def c
Definition: compressB64.py:93