Keos::CSingleton< T > Class Template Reference

Template class for creating single-instance global classes. More...

#include <KeosSingleton.h>

Inheritance diagram for Keos::CSingleton< T >:

Inheritance graph
[legend]
List of all members.

Static Public Member Functions

static void Create ()
 Create instance of the class.
static T & Instance ()
 Return single-instance of the class.
static void Destroy ()
 Destroy single-instance of the class.
static void _SetInstance (T *pInst)
 Change the intance of the class.

Protected Member Functions

 CSingleton ()
 Default constructor.
 ~CSingleton ()
 Destructor.

Detailed Description

template<class T>
class Keos::CSingleton< T >

Template class for creating single-instance global classes.

Definition at line 34 of file KeosSingleton.h.


Constructor & Destructor Documentation

template<class T>
Keos::CSingleton< T >::CSingleton (  )  [inline, protected]

Default constructor.

Definition at line 80 of file KeosSingleton.h.

template<class T>
Keos::CSingleton< T >::~CSingleton (  )  [inline, protected]

Destructor.

Definition at line 86 of file KeosSingleton.h.


Member Function Documentation

template<class T>
static void Keos::CSingleton< T >::Create (  )  [inline, static]

Create instance of the class.

Definition at line 41 of file KeosSingleton.h.

template<class T>
static T& Keos::CSingleton< T >::Instance (  )  [inline, static]

Return single-instance of the class.

Returns:
The single-instance.

Definition at line 50 of file KeosSingleton.h.

Referenced by Keos::CMeshGeom::AssignColor(), Keos::Console::CLookDefault::CLookDefault(), Keos::CMeshGeom::CMeshGeom(), Keos::CPlatformManager::CPlatformManager(), Keos::CTexture::CreateFromFile(), Keos::CTexture::CreateFromImage(), Keos::CMaterial::CreateTexture(), Keos::CWin32ConfigDialog::DlgProc(), Keos::dllStartPlugin(), Keos::CGraphicString::Draw(), Keos::CGraphicString::GetPixelSize(), Keos::IRenderApp::GetRenderSystem(), Keos::IRenderApp::GetTime(), Keos::handleTerminate(), Keos::IRenderSystem::InitConfigOptions(), Keos::IRenderTarget::IRenderTarget(), Keos::CFontManager::LoadFont(), Keos::CShader::LoadFromFile(), Keos::CRoot::LoadPlugin(), Keos::CMeshGen::MakeCube(), Keos::CMeshGen::MakeSphere(), Keos::CXMLConfigFile::Save(), Keos::CTexture::SaveToFile(), Keos::CRoot::ShowConfigDialog(), Keos::CRoot::Shutdown(), Keos::IRenderSystem::Shutdown(), Keos::CD3D9Window::SwapBuffers(), Keos::CRoot::UnloadPlugins(), Keos::CD3D9Window::Update(), Keos::Console::CLookDefault::Update(), Keos::IRenderSystem::UpdateAllRenderTargets(), Keos::CWin32Window::WndProc(), Keos::CD3D9Window::WndProc(), and Keos::IResource::~IResource().

template<class T>
static void Keos::CSingleton< T >::Destroy ( void   )  [inline, static]

Destroy single-instance of the class.

Definition at line 61 of file KeosSingleton.h.

Referenced by Keos::CRoot::Shutdown().

template<class T>
static void Keos::CSingleton< T >::_SetInstance ( T *  pInst  )  [inline, static]

Change the intance of the class.

Definition at line 70 of file KeosSingleton.h.


The documentation for this class was generated from the following file:
Generated on Fri Mar 9 14:29:29 2007 for Keos by  doxygen 1.5.1-p1