AQUAgpusph 4.1.2
|
Simple but versatile singleton instance (Meyers singleton). More...
#include <Singleton.h>
Static Public Member Functions | |
static T * | singleton () |
Returns the instance of the class. | |
Protected Member Functions | |
Singleton () | |
Constructor. | |
virtual | ~Singleton () |
Destructor. | |
Simple but versatile singleton instance (Meyers singleton).
The singletons are instances that can be accessed everywhere even though it has not been passed as argument.
To create a singleton instance just define the class as an inherited of this one:
Then you can access your class everywhere you want (please, don't forget to include your class header):
|
inlineprotected |
Constructor.
|
inlineprotectedvirtual |
Destructor.
|
inlinestatic |
Returns the instance of the class.