ATLAS Offline Software
Loading...
Searching...
No Matches
pool::DbConnection Class Reference

Definition of the DbConnection class. More...

#include <StorageSvc/DbConnection.h>

Inheritance diagram for pool::DbConnection:
Collaboration diagram for pool::DbConnection:

Public Member Functions

 DbConnection (int typ, const std::string &nam, void *hdl)
 Constructor with initializing arguments.
 DbConnection (const DbConnection &c)
 Copy Constructor.
virtual ~DbConnection ()
 Standard destructor.
DbConnectionoperator= (const DbConnection &)=delete
int release ()
 Release token: Decrease reference count and eventually delete.
int addRef ()
 Increase reference count.
virtual void * handle ()
 Access object identifier.
virtual const void * handle () const
virtual const std::string & name () const
 Access Database identifier.
virtual int type () const
 Access technoliogy type.

Private Attributes

int m_refCount
 Reference count.
int m_type
 Connection type.
std::string m_name
 Name of this connection.
void * m_handle
 True handle.

Detailed Description

Definition of the DbConnection class.

The connection holds data specific to dealing with one type of Database.

This is NOT a public class...Let's see if there is anyone out there capable of respecting this.

Author
: M.Frank
Version
1.0

Definition at line 30 of file DbConnection.h.

Constructor & Destructor Documentation

◆ DbConnection() [1/2]

pool::DbConnection::DbConnection ( int typ,
const std::string & nam,
void * hdl )
inline

Constructor with initializing arguments.

Definition at line 42 of file DbConnection.h.

43 : DatabaseConnection(),
44 m_refCount(0), m_type(typ), m_name(nam), m_handle(hdl) { }
int m_type
Connection type.
int m_refCount
Reference count.
void * m_handle
True handle.
std::string m_name
Name of this connection.

◆ DbConnection() [2/2]

pool::DbConnection::DbConnection ( const DbConnection & c)
inline

Copy Constructor.

Definition at line 46 of file DbConnection.h.

47 : DatabaseConnection(),
48 m_refCount(0), m_type(c.m_type), m_name(c.m_name), m_handle(c.m_handle){}

◆ ~DbConnection()

virtual pool::DbConnection::~DbConnection ( )
inlinevirtual

Standard destructor.

Definition at line 50 of file DbConnection.h.

50{ }

Member Function Documentation

◆ addRef()

int pool::DbConnection::addRef ( )
inline

Increase reference count.

Definition at line 63 of file DbConnection.h.

63{ return ++m_refCount; }

◆ handle() [1/2]

virtual void * pool::DbConnection::handle ( )
inlinevirtual

Access object identifier.

Implements pool::DatabaseConnection.

Definition at line 65 of file DbConnection.h.

65{ return m_handle; }

◆ handle() [2/2]

virtual const void * pool::DbConnection::handle ( ) const
inlinevirtual

Implements pool::DatabaseConnection.

Definition at line 66 of file DbConnection.h.

66{ return m_handle; }

◆ name()

virtual const std::string & pool::DbConnection::name ( ) const
inlinevirtual

Access Database identifier.

Implements pool::DatabaseConnection.

Definition at line 68 of file DbConnection.h.

68{ return m_name; }

◆ operator=()

DbConnection & pool::DbConnection::operator= ( const DbConnection & )
delete

◆ release()

int pool::DbConnection::release ( )
inline

Release token: Decrease reference count and eventually delete.

Definition at line 55 of file DbConnection.h.

55 {
56 int cnt = --m_refCount;
57 if ( 0 >= cnt ) {
58 delete this;
59 }
60 return cnt;
61 }

◆ type()

virtual int pool::DbConnection::type ( ) const
inlinevirtual

Access technoliogy type.

Implements pool::DatabaseConnection.

Definition at line 70 of file DbConnection.h.

70{ return m_type; }

Member Data Documentation

◆ m_handle

void* pool::DbConnection::m_handle
private

True handle.

Definition at line 39 of file DbConnection.h.

◆ m_name

std::string pool::DbConnection::m_name
private

Name of this connection.

Definition at line 37 of file DbConnection.h.

◆ m_refCount

int pool::DbConnection::m_refCount
private

Reference count.

Definition at line 33 of file DbConnection.h.

◆ m_type

int pool::DbConnection::m_type
private

Connection type.

Definition at line 35 of file DbConnection.h.


The documentation for this class was generated from the following file: