CSingleton Class Reference

A Singleton class should only exist with a single object in runtime. More...

#include <Module.h>

Inheritance diagram for CSingleton:

CApplication CInputHandler CLayoutConsole CLayoutCredits CLayoutDebugPre CLayoutFCAccounts CLayoutFCCreate CLayoutFCEval CLayoutFCMain CLayoutFCPresim CLayoutFCSettings CLayoutFCSim CLayoutFCStats CLayoutNotify CLayoutTREval CLayoutTRLogin CLayoutTRPresim CLayoutTRSettings CModule

List of all members.

Static Public Member Functions

static void RegisterSingleton (string name, CSingleton *)
 register the given singleton with the given name
static void UnRegisterSingleton (string name)
 unregister the singleton with the given name
static CSingletonSearchSingleton (string name)
 returns the pointer to singleton that was registered with that name
static void * GetInstance ()
 sub classes should implement this for easy access to self (which is a singleton)

Static Private Attributes

static std::map< string,
CSingleton * > 
s_registry
 private data, holding the string to singleton ptr map


Detailed Description

A Singleton class should only exist with a single object in runtime.

Implements a basic Singleton pattern


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

Generated on Fri Jun 13 19:46:39 2008 for OPSIMUS by  doxygen 1.5.5