![]() |
Go to the source code of this file.
Macros | |
#define | OPENFLUID_SINGLETON_DEFINITION(T) |
#define | OPENFLUID_SINGLETON_INITIALIZATION(T) |
#define OPENFLUID_SINGLETON_DEFINITION | ( | T | ) |
Macro for definition of a dynamic singleton, providing instance() and kill() methods to the class in which it is defined. It must be put in the .hpp file, at the beginning of the class. This implementation is not thread safe.
Example of use to design an Example class as a dynamic singleton
#define OPENFLUID_SINGLETON_INITIALIZATION | ( | T | ) |
Macro for initialization of a dynamic singleton, must be put in the .cpp file.