ASL
|
This class can be used to create singletons from existing classes.
These are classes of which there can only be one instance and that instance is not explicitly created.
Can be used on existing classes withoud defining one:
Or declaring a typedef:
Or defining a class as a subclass of a singleton of itself:
#include <Singleton.h>
Static Public Member Functions | |
static T * | instance () |
Returns a pointer to an instance of class T, creating it on the first call. | |