QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
QgsConnectionPoolGroup< T > Class Template Reference

#include <qgsconnectionpool.h>

Classes

struct  Item

Public Member Functions

 QgsConnectionPoolGroup (const QString &ci)
 ~QgsConnectionPoolGroup ()
acquire ()
void release (T conn)

Static Public Attributes

static const int maxConcurrentConnections

Protected Member Functions

void initTimer (QObject *parent)
void onConnectionExpired ()

Protected Attributes

QString connInfo
QStack< Itemconns
QMutex connMutex
QSemaphore sem
QTimer * expirationTimer

Detailed Description

template<typename T>
class QgsConnectionPoolGroup< T >

Template that stores data related to one server.

It is assumed that following functions exist:

Because of issues with templates and QObject's signals and slots, this class only provides helper functions for QObject-related functionality - the place which uses the template is resonsible for:

For an example on how to use the template class, have a look at the implementation in postgres/spatialite providers.

Constructor & Destructor Documentation

template<typename T >
QgsConnectionPoolGroup< T >::QgsConnectionPoolGroup ( const QString &  ci)
inline
template<typename T >
QgsConnectionPoolGroup< T >::~QgsConnectionPoolGroup ( )
inline

Member Function Documentation

template<typename T >
T QgsConnectionPoolGroup< T >::acquire ( )
inline
template<typename T >
void QgsConnectionPoolGroup< T >::initTimer ( QObject *  parent)
inlineprotected
template<typename T >
void QgsConnectionPoolGroup< T >::onConnectionExpired ( )
inlineprotected
template<typename T >
void QgsConnectionPoolGroup< T >::release ( conn)
inline

Member Data Documentation

template<typename T >
QString QgsConnectionPoolGroup< T >::connInfo
protected
template<typename T >
QMutex QgsConnectionPoolGroup< T >::connMutex
protected
template<typename T >
QStack<Item> QgsConnectionPoolGroup< T >::conns
protected
template<typename T >
QTimer* QgsConnectionPoolGroup< T >::expirationTimer
protected
template<typename T >
const int QgsConnectionPoolGroup< T >::maxConcurrentConnections
static
template<typename T >
QSemaphore QgsConnectionPoolGroup< T >::sem
protected

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