ATLAS Offline Software
Loading...
Searching...
No Matches
pool::DbHandleBase< T > Class Template Reference

Description: Definition of the generic database object handle. More...

#include <StorageSvc/DbHandleBase.h>

Collaboration diagram for pool::DbHandleBase< T >:

Public Member Functions

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

Protected Types

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

Protected Member Functions

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

Protected Attributes

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

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(); }
DbType m_type
Data member: Technology type. Sub-classes need access on re-assignment.

◆ 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) { }
T * m_ptr
Data member: Object pointer. Sub-classes need access on re-assignment.

◆ 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(); }
bool isValid() const
Validity check (Objy like)

◆ 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; }
const T * ptr() const
Access to underlying object.

◆ 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; }
Description: Definition of the generic database object handle.

◆ 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: