Singleton< T > Class Template Reference

A template class that implements the Singleton pattern. More...

#include <singleton.h>

List of all members.

Static Public Member Functions

static T * Get ()
 Static method to access the only pointer of this instance.
static void Free ()
 Release resources.

Protected Member Functions

 Singleton ()
 Default constructor.
virtual ~Singleton ()
 Destructor.


Detailed Description

template<class T>
class Singleton< T >

A template class that implements the Singleton pattern.

Written on 08-23-2006 by Eran Ifrah. Many thanks for allowing the free use of this template!

Definition at line 20 of file singleton.h.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 43 of file singleton.h.

template<class T>
Singleton< T >::~Singleton (  )  [inline, protected, virtual]

Destructor.

Definition at line 47 of file singleton.h.


Member Function Documentation

template<class T>
T * Singleton< T >::Get (  )  [inline, static]

Static method to access the only pointer of this instance.

Returns:
a pointer to the only instance of this class

Definition at line 51 of file singleton.h.

template<class T>
void Singleton< T >::Free (  )  [inline, static]

Release resources.

Definition at line 60 of file singleton.h.


Generated for UnsignedByte by  doxygen 1.5.3
SourceForge.net Logo