ATLAS Offline Software
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
pool::DbHandleBase< T > Class Template Reference

#include <StorageSvc/DbHandleBase.h>

Collaboration diagram for pool::DbHandleBase< T >:

Public Member Functions

T * operator-> ()
 Dereference operator. More...
 
const T * operator-> () const
 
bool operator! () const
 Validity check through operator NOT. More...
 
const T * ptr () const
 Access to underlying object. More...
 
T * ptr ()
 
bool isValid () const
 Validity check (Objy like) More...
 
const DbTypetype () const
 Inquire storage type of the handle. More...
 

Protected Types

typedef T _DataType
 Data type definition. More...
 
typedef DbHandleBase< _DataTypeBase
 Data type definition. More...
 

Protected Member Functions

 ~DbHandleBase ()
 Standard destructor. More...
 
 DbHandleBase ()
 Standard constructor. More...
 
 DbHandleBase (const DbHandleBase &)=delete
 
 DbHandleBase (DbHandleBase &&)=delete
 
DbHandleBaseoperator= (const DbHandleBase &)=delete
 
DbHandleBaseoperator= (DbHandleBase &&)=delete
 
void setType (const DbType &typ)
 Set handle type. More...
 
void setPtr (T *ptr)
 Set data pointer. More...
 

Protected Attributes

T * m_ptr
 Data member: Object pointer. Sub-classes need access on re-assignment. More...
 
DbType m_type
 Data member: Technology type. Sub-classes need access on re-assignment. More...
 

Detailed Description

template<class T>
class pool::DbHandleBase< T >

Description: Definition of the generic database object handle.

Author
M.Frank
Version
1.0

Definition at line 31 of file DbHandleBase.h.

Member Typedef Documentation

◆ _DataType

template<class T >
typedef T pool::DbHandleBase< T >::_DataType
protected

Data type definition.

Definition at line 34 of file DbHandleBase.h.

◆ Base

template<class T >
typedef DbHandleBase<_DataType> pool::DbHandleBase< T >::Base
protected

Data type definition.

Definition at line 36 of file DbHandleBase.h.

Constructor & Destructor Documentation

◆ ~DbHandleBase()

template<class T >
pool::DbHandleBase< T >::~DbHandleBase ( )
inlineprotected

Standard destructor.

Definition at line 43 of file DbHandleBase.h.

43 { m_type.check(); }

◆ DbHandleBase() [1/3]

template<class T >
pool::DbHandleBase< T >::DbHandleBase ( )
inlineprotected

Standard constructor.

Definition at line 45 of file DbHandleBase.h.

45 : m_ptr(0), m_type(0) { }

◆ DbHandleBase() [2/3]

template<class T >
pool::DbHandleBase< T >::DbHandleBase ( const DbHandleBase< T > &  )
protecteddelete

◆ DbHandleBase() [3/3]

template<class T >
pool::DbHandleBase< T >::DbHandleBase ( DbHandleBase< T > &&  )
protecteddelete

Member Function Documentation

◆ isValid()

template<class T >
bool pool::DbHandleBase< T >::isValid ( ) const
inline

Validity check (Objy like)

Definition at line 68 of file DbHandleBase.h.

68 { return 0 != m_ptr; }

◆ operator!()

template<class T >
bool pool::DbHandleBase< T >::operator! ( ) const
inline

Validity check through operator NOT.

Definition at line 63 of file DbHandleBase.h.

63 { return !isValid(); }

◆ operator->() [1/2]

template<class T >
T* pool::DbHandleBase< T >::operator-> ( )
inline

Dereference operator.

Definition at line 60 of file DbHandleBase.h.

60 { return m_ptr; }

◆ operator->() [2/2]

template<class T >
const T* pool::DbHandleBase< T >::operator-> ( ) const
inline

Definition at line 61 of file DbHandleBase.h.

61 { return m_ptr; }

◆ operator=() [1/2]

template<class T >
DbHandleBase& pool::DbHandleBase< T >::operator= ( const DbHandleBase< T > &  )
protecteddelete

◆ operator=() [2/2]

template<class T >
DbHandleBase& pool::DbHandleBase< T >::operator= ( DbHandleBase< T > &&  )
protecteddelete

◆ ptr() [1/2]

template<class T >
T* pool::DbHandleBase< T >::ptr ( )
inline

Definition at line 66 of file DbHandleBase.h.

66 { return m_ptr; }

◆ ptr() [2/2]

template<class T >
const T* pool::DbHandleBase< T >::ptr ( ) const
inline

Access to underlying object.

Definition at line 65 of file DbHandleBase.h.

65 { return m_ptr; }

◆ setPtr()

template<class T >
void pool::DbHandleBase< T >::setPtr ( T *  ptr)
inlineprotected

Set data pointer.

Definition at line 56 of file DbHandleBase.h.

56 { m_ptr=ptr; }

◆ setType()

template<class T >
void pool::DbHandleBase< T >::setType ( const DbType typ)
inlineprotected

Set handle type.

Definition at line 54 of file DbHandleBase.h.

54 { m_type=typ; }

◆ type()

template<class T >
const DbType& pool::DbHandleBase< T >::type ( ) const
inline

Inquire storage type of the handle.

Definition at line 70 of file DbHandleBase.h.

70 { return m_type; }

Member Data Documentation

◆ m_ptr

template<class T >
T* pool::DbHandleBase< T >::m_ptr
protected

Data member: Object pointer. Sub-classes need access on re-assignment.

Definition at line 38 of file DbHandleBase.h.

◆ m_type

template<class T >
DbType pool::DbHandleBase< T >::m_type
protected

Data member: Technology type. Sub-classes need access on re-assignment.

Definition at line 40 of file DbHandleBase.h.


The documentation for this class was generated from the following file:
pool::DbHandleBase::isValid
bool isValid() const
Validity check (Objy like)
Definition: DbHandleBase.h:68
pool::DbType::check
void check() const
Check if type is within allowed range.
Definition: DbType.h:87
pool::DbHandleBase::m_ptr
T * m_ptr
Data member: Object pointer. Sub-classes need access on re-assignment.
Definition: DbHandleBase.h:38
pool::DbHandleBase::ptr
const T * ptr() const
Access to underlying object.
Definition: DbHandleBase.h:65
pool::DbHandleBase::m_type
DbType m_type
Data member: Technology type. Sub-classes need access on re-assignment.
Definition: DbHandleBase.h:40