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

#include <StorageSvc/DbHandleBase.h>

Collaboration diagram for pool::DbHandleBase:

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...
 
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

Description: Definition of the generic database object handle.

Author
M.Frank
Version
1.0

Definition at line 24 of file DbHandleBase.h.

Member Typedef Documentation

◆ _DataType

typedef T pool::DbHandleBase::_DataType
protected

Data type definition.

Definition at line 37 of file DbHandleBase.h.

◆ Base

Data type definition.

Definition at line 39 of file DbHandleBase.h.

Constructor & Destructor Documentation

◆ ~DbHandleBase()

pool::DbHandleBase::~DbHandleBase ( )
inlineprotected

Standard destructor.

Definition at line 46 of file DbHandleBase.h.

46 { m_type.check(); }

◆ DbHandleBase()

pool::DbHandleBase::DbHandleBase ( )
inlineprotected

Standard constructor.

Definition at line 48 of file DbHandleBase.h.

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

Member Function Documentation

◆ isValid()

bool pool::DbHandleBase::isValid ( ) const
inline

Validity check (Objy like)

Definition at line 64 of file DbHandleBase.h.

64 { return 0 != m_ptr; }

◆ operator!()

bool pool::DbHandleBase::operator! ( ) const
inline

Validity check through operator NOT.

Definition at line 59 of file DbHandleBase.h.

59 { return !isValid(); }

◆ operator->() [1/2]

T* pool::DbHandleBase::operator-> ( )
inline

Dereference operator.

Definition at line 56 of file DbHandleBase.h.

56 { return m_ptr; }

◆ operator->() [2/2]

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

Definition at line 57 of file DbHandleBase.h.

57 { return m_ptr; }

◆ ptr() [1/2]

T* pool::DbHandleBase::ptr ( )
inline

Definition at line 62 of file DbHandleBase.h.

62 { return m_ptr; }

◆ ptr() [2/2]

const T* pool::DbHandleBase::ptr ( ) const
inline

Access to underlying object.

Definition at line 61 of file DbHandleBase.h.

61 { return m_ptr; }

◆ setPtr()

void pool::DbHandleBase::setPtr ( T *  ptr)
inlineprotected

Set data pointer.

Definition at line 52 of file DbHandleBase.h.

52 { m_ptr=ptr; }

◆ setType()

void pool::DbHandleBase::setType ( const DbType typ)
inlineprotected

Set handle type.

Definition at line 50 of file DbHandleBase.h.

50 { m_type=typ; }

◆ type()

const DbType& pool::DbHandleBase::type ( ) const
inline

Inquire storage type of the handle.

Definition at line 66 of file DbHandleBase.h.

66 { return m_type; }

Member Data Documentation

◆ m_ptr

T* pool::DbHandleBase::m_ptr
protected

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

Definition at line 41 of file DbHandleBase.h.

◆ m_type

DbType pool::DbHandleBase::m_type
protected

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

Definition at line 43 of file DbHandleBase.h.


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