#include <Singleton.h>
Collaboration diagram for Singleton< T, InstanceArg >:
Static Public Member Functions | |
static T * | getInstance () |
static T * | getInstance (InstanceArg *Arg) |
Static Private Attributes | |
static T * | m_pInstance = 0 |
Definition at line 1 of file Singleton.h.
static T* Singleton< T, InstanceArg >::getInstance | ( | InstanceArg * | Arg | ) | [inline, static] |
Definition at line 11 of file Singleton.h.
00011 { 00012 if(Singleton<T,InstanceArg>::m_pInstance == 0) { 00013 Singleton<T,InstanceArg>::m_pInstance = new T(Arg); 00014 return Singleton<T,InstanceArg>::m_pInstance; 00015 } 00016 else 00017 return Singleton<T,InstanceArg>::m_pInstance; 00018 }
static T* Singleton< T, InstanceArg >::getInstance | ( | ) | [inline, static] |
Definition at line 3 of file Singleton.h.
00003 { 00004 if(Singleton<T,InstanceArg>::m_pInstance == 0) { 00005 Singleton<T,InstanceArg>::m_pInstance = new T(); 00006 return Singleton<T,InstanceArg>::m_pInstance; 00007 } 00008 else 00009 return Singleton<T,InstanceArg>::m_pInstance; 00010 }
T * Singleton< T, InstanceArg >::m_pInstance = 0 [static, private] |
Definition at line 21 of file Singleton.h.