TexGen
Public Member Functions | Static Public Member Functions | Static Protected Attributes | List of all members
TexGen::CSingleton< T > Class Template Reference

Template used as a base class for creating singletons. More...

#include <Singleton.h>

Public Member Functions

 CSingleton ()
 

Static Public Member Functions

static T & GetInstance ()
 

Static Protected Attributes

static T m_SingleInstance
 

Detailed Description

template<typename T>
class TexGen::CSingleton< T >

Template used as a base class for creating singletons.

Declare a singleton class as class CMyClass : public CSingleton<CMyClass> To declare the single instance this line should be put at the top of the .cpp file template<> CMyClass CSingleton<CMyClass>::m_SingleInstance = CMyClass();

Definition at line 31 of file Singleton.h.

Constructor & Destructor Documentation

◆ CSingleton()

template<typename T >
TexGen::CSingleton< T >::CSingleton ( )
inline

Definition at line 34 of file Singleton.h.

References TexGen::CSingleton< T >::GetInstance().

Member Function Documentation

◆ GetInstance()

template<typename T >
static T & TexGen::CSingleton< T >::GetInstance ( )
inlinestatic

Definition at line 40 of file Singleton.h.

Referenced by TexGen::CSingleton< T >::CSingleton().

Member Data Documentation

◆ m_SingleInstance

template<typename T >
T TexGen::CSingleton< T >::m_SingleInstance
staticprotected

Definition at line 45 of file Singleton.h.


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