43 #if defined(SWIG_MAIN) || !defined(SWIG)
49 # pragma warning (disable : 4311)
50 # pragma warning (disable : 4312)
79 "Singleton class already exists. Cannot make multiple singletons");
81 #if defined( _MSC_VER ) && _MSC_VER < 1200
83 SingletonPtr = (Type*)((
int)
this + offset);
85 SingletonPtr =
static_cast<Type*
>(
this);
99 #ifdef THROW_ON_FETCH_FAIL
103 "Attempting to fetch invalid Singleton pointer");
112 return SingletonPtr != NULL;
static Type * SingletonPtr
The one and only pointer to the single object.
bool Boole
Generally acts a single bit, true or false.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
This is a convenience base class intended to be used with classes that need to be singletons...
This implements the exception hiearchy for Mezzanine.
static Boole SingletonValid()
Checks to see if the singleton pointer is valid.
static Type * GetSingletonPtr()
Fetches a pointer to the singleton.
Thrown when the available information should have worked but failed for unknown reasons.
Singleton()
Class constructor.
The bulk of the engine components go in this namspace.
~Singleton()
Class destructor.