class QgsConnectionPoolGroup< T >
Template that stores data related to one server.
It is assumed that following functions exist:
- void qgsConnectionPool_ConnectionCreate(QString name, T& c) ... create a new connection
- void qgsConnectionPool_ConnectionDestroy(T c) ... destroy the connection
- QString qgsConnectionPool_ConnectionToName(T c) ... lookup connection's name (path)
- void qgsConnectionPool_InvalidateConnection(T c) ... flag a connection as invalid
- bool qgsConnectionPool_ConnectionIsValid(T c) ... return whether a connection is valid
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:
- being derived from QObject
- calling initTimer( this ) in constructor
- having handleConnectionExpired() slot that calls onConnectionExpired()
- having startExpirationTimer(), stopExpirationTimer() slots to start/stop the expiration timer
For an example on how to use the template class, have a look at the implementation in postgres/spatialite providers.
Definition at line 53 of file qgsconnectionpool.h.