Static Public Member Functions | Private Member Functions | Static Private Attributes

Singleton< T > Class Template Reference

A singleton design pattern implementation. More...

#include <Singleton.h>

List of all members.

Static Public Member Functions

static T * instance ()
static void destroy ()

Private Member Functions

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

Static Private Attributes

static T * inst = NULL

Detailed Description

template<typename T>
class Singleton< T >

A singleton design pattern implementation.

A singleton has a unique instance accessible through the method instance().

Definition at line 31 of file Singleton.h.


Member Function Documentation

template<typename T>
static void Singleton< T >::destroy (  ) [inline, static]

Destroy the unique instance of the class.

Definition at line 54 of file Singleton.h.

template<typename T>
static T* Singleton< T >::instance (  ) [inline, static]

Returns a pointer to the unique instance of the class or create one if there is none.

Definition at line 42 of file Singleton.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables