NGL  6.5
The NCCA Graphics Library
ngl::Singleton< T > Class Template Reference

Singleton template added to NGL framework 20/04/10 by jmacey. More...

#include <Singleton.h>

+ Inheritance diagram for ngl::Singleton< T >:
+ Collaboration diagram for ngl::Singleton< T >:

Public Member Functions

 Singleton (const Singleton &)=delete
 
Singletonoperator= (const Singleton &)=delete
 

Static Public Member Functions

static T * instance ()
 Get the instance. More...
 

Protected Member Functions

 Singleton ()
 Constructor. More...
 
virtual ~Singleton ()
 Destructor. More...
 

Static Protected Member Functions

static void killSingleton ()
 

Static Protected Attributes

static T * s_instance = 0
 unique instance of the singleton More...
 

Detailed Description

template<class T>
class ngl::Singleton< T >

Singleton template added to NGL framework 20/04/10 by jmacey.

Author
Vincent Bonnet
Version
1.0
Date
14/03/10 Last Revision 14/03/10

Definition at line 40 of file Singleton.h.

Constructor & Destructor Documentation

template<class T>
ngl::Singleton< T >::Singleton ( const Singleton< T > &  )
delete
template<class T >
ngl::Singleton< T >::Singleton ( )
protected

Constructor.

Constructor ----------------------------------------------------------------------------------------------------------—.

Definition at line 75 of file Singleton.h.

template<class T >
ngl::Singleton< T >::~Singleton ( )
protectedvirtual

Destructor.

Destructor ------------------------------------------------------------------------------------------------------------—.

Definition at line 82 of file Singleton.h.

Member Function Documentation

template<class T >
T * ngl::Singleton< T >::instance ( )
static

Get the instance.

Get instance -----------------------------------------------------------------------------------------------------------—.

Returns
the unique instance

Definition at line 88 of file Singleton.h.

template<class T>
static void ngl::Singleton< T >::killSingleton ( )
inlinestaticprotected

Definition at line 67 of file Singleton.h.

template<class T>
Singleton& ngl::Singleton< T >::operator= ( const Singleton< T > &  )
delete

Member Data Documentation

template<class T>
T * ngl::Singleton< T >::s_instance = 0
staticprotected

unique instance of the singleton

Definition at line 66 of file Singleton.h.


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