35 #ifndef _CEGUISingleton_h_
36 #define _CEGUISingleton_h_
38 #include "CEGUI/Base.h"
55 template <
typename T>
class CEGUIEXPORT Singleton
72 assert( !ms_Singleton );
73 ms_Singleton =
static_cast<T*
>(
this);
76 { assert( ms_Singleton ); ms_Singleton = 0; }
77 static T& getSingleton(
void )
78 { assert( ms_Singleton );
return ( *ms_Singleton ); }
79 static T* getSingletonPtr(
void )
80 {
return ( ms_Singleton ); }
83 Singleton& operator=(
const Singleton&) {
return this; }
84 Singleton(
const Singleton&) {}
91 #endif // end of guard _CEGUISingleton_h_
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42