Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

peon::ISingleton< T > Class Template Reference

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

#include <ISingleton.h>

List of all members.

Public Member Functions

 ISingleton (void)
 Constructor.
 ~ISingleton (void)
 Destructor.

Static Public Member Functions

static T & getSingleton (void)
 This method just returns the internal member by reference.
static T * getSingletonPtr (void)
 This method just returns the internal member by a pointer.

Static Protected Attributes

static T * ms_Singleton
 The static member object.


Detailed Description

template<typename T>
class peon::ISingleton< T >

Template class for creating single-instance global classes.

The code in this file is taken from article 1.3 in the the book: Game Programming Gems from Charles River Media with the copyright notice going to Scott Bilas.


Member Function Documentation

template<typename T>
static T& peon::ISingleton< T >::getSingleton void   )  [inline, static]
 

This method just returns the internal member by reference.

Returns:
T& - reference to internal abstract Type

Reimplemented in peon::AudioEngine, peon::EngineCore, peon::FileLogger, peon::InputEngine, and peon::SceneRoot.

template<typename T>
static T* peon::ISingleton< T >::getSingletonPtr void   )  [inline, static]
 

This method just returns the internal member by a pointer.

Returns:
T* - pointer to the internal abstract Type

Reimplemented in peon::AudioEngine, peon::EngineCore, peon::FileLogger, peon::InputEngine, and peon::SceneRoot.


The documentation for this class was generated from the following file:
Generated on Thu Dec 1 01:55:41 2005 for Peon by  doxygen 1.4.1