1
1
forked from 0ad/0ad

IsInitialised() on singletons, for when you need to know whether certain things (e.g. the config database) exist yet

This was SVN commit r992.
This commit is contained in:
Ykkrosh 2004-08-15 20:47:25 +00:00
parent 5edadf1433
commit 98a4cea133

View File

@ -5,7 +5,7 @@
//
// USEAGE: class myClass : Singleton<myClass>{};
//
// INFO: This implementation was copied from:
// INFO: This implementation was originally copied from:
//
// Enginuity, Part II
// Memory Management, Error Logging, and Utility Classes;
@ -56,6 +56,11 @@ class Singleton
assert( ms_singleton );
return ms_singleton;
}
static bool IsInitialised()
{
return (ms_singleton != 0);
}
};
template <typename T>