QxOrm  1.5.0
C++ Object Relational Mapping library
qx::QxSingleton< T > Class Template Reference

qx::QxSingleton<T> : concrete class to define a thread-safe singleton of type T More...

#include <QxSingleton.h>

Inheritance diagram for qx::QxSingleton< T >:
qx::IxSingleton

List of all members.

Static Public Member Functions

static T * getSingleton ()
static void deleteSingleton ()

Protected Member Functions

 QxSingleton (const QString &sKey)
virtual ~QxSingleton ()
virtual void deleteInstance ()

Static Protected Member Functions

static bool isSingletonNull ()

Static Private Attributes

static T * m_pSingleton
 Singleton -> only 1 instance allowed.
static QMutex m_oMutexSingleton
 Mutex -> 'QxSingleton' is thread-safe.

Detailed Description

template<class T>
class qx::QxSingleton< T >

qx::QxSingleton<T> : concrete class to define a thread-safe singleton of type T

Definition at line 58 of file QxSingleton.h.


Constructor & Destructor Documentation

template<class T>
qx::QxSingleton< T >::QxSingleton ( const QString &  sKey) [inline, protected]

Definition at line 68 of file QxSingleton.h.

template<class T>
virtual qx::QxSingleton< T >::~QxSingleton ( ) [inline, protected, virtual]

Definition at line 69 of file QxSingleton.h.


Member Function Documentation

template<class T>
virtual void qx::QxSingleton< T >::deleteInstance ( ) [inline, protected, virtual]

Implements qx::IxSingleton.

Definition at line 80 of file QxSingleton.h.

template<class T>
static void qx::QxSingleton< T >::deleteSingleton ( ) [static]
template<class T>
static T* qx::QxSingleton< T >::getSingleton ( ) [static]
template<class T>
static bool qx::QxSingleton< T >::isSingletonNull ( ) [inline, static, protected]

Definition at line 78 of file QxSingleton.h.


Member Data Documentation

template<class T>
QMutex qx::QxSingleton< T >::m_oMutexSingleton [static, private]

Mutex -> 'QxSingleton' is thread-safe.

Definition at line 64 of file QxSingleton.h.

template<class T>
T* qx::QxSingleton< T >::m_pSingleton [static, private]

Singleton -> only 1 instance allowed.

Definition at line 63 of file QxSingleton.h.


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