te::pgis::ScopedConnection Class Reference

A class that control the use of the connection to a PostgreSQL database. More...

#include <ScopedConnection.h>

Public Member Functions

Connectionoperator-> () const
 
void release ()
 Release connection. More...
 
 ScopedConnection (ConnectionPool *pool, int id=-1)
 Constructor. More...
 
 ~ScopedConnection ()
 Destructor. More...
 

Protected Member Functions

ScopedConnectionoperator= (const ScopedConnection &)
 
 ScopedConnection (const ScopedConnection &)
 

Private Attributes

Connectionm_connection
 An available connection that will be released when the scopedConnection is deleted. More...
 
ConnectionPoolm_connectionPool
 The connection pool associated to the connection. More...
 

Detailed Description

A class that control the use of the connection to a PostgreSQL database.

This class control the use of the connection and release the connection to the connectionPool.

See also
Connection

Definition at line 48 of file ScopedConnection.h.

Constructor & Destructor Documentation

te::pgis::ScopedConnection::ScopedConnection ( ConnectionPool pool,
int  id = -1 
)

Constructor.

te::pgis::ScopedConnection::~ScopedConnection ( )

Destructor.

te::pgis::ScopedConnection::ScopedConnection ( const ScopedConnection )
protected

Member Function Documentation

Connection* te::pgis::ScopedConnection::operator-> ( ) const

Member access operator.

ScopedConnection& te::pgis::ScopedConnection::operator= ( const ScopedConnection )
protected
void te::pgis::ScopedConnection::release ( )

Release connection.

Member Data Documentation

Connection* te::pgis::ScopedConnection::m_connection
private

An available connection that will be released when the scopedConnection is deleted.

Definition at line 72 of file ScopedConnection.h.

ConnectionPool* te::pgis::ScopedConnection::m_connectionPool
private

The connection pool associated to the connection.

Definition at line 73 of file ScopedConnection.h.


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