23 #include <QScopedPointer>
66 if(m_instance.isNull())
69 if(m_instance.isNull())
71 m_instance.reset(
new T());
75 return m_instance.data();
86 #define TTK_DECLARE_SINGLETON_CLASS(Class) \
87 friend class TTKSingleton<Class>; \
88 friend struct QScopedPointerDeleter<Class>;
90 #endif // TTKSINGLETON_H
#define TTK_MODULE_EXPORT
The class of the singleton base.
static QMutex m_mutex
// Singleton Implementation // //
static QScopedPointer< T > m_instance
#define TTK_DISABLE_COPY(Class)