OpenLexocad
28.0
|
Go to the source code of this file.
Macros | |
#define | DECLARE_SINGLETON(CLASSNAME) |
#define | DEFINE_SINGLETON(CLASSNAME) |
Singleton template macro definition. Use this macros to define singleton classes.
#define DECLARE_SINGLETON | ( | CLASSNAME | ) |
Singleton class declaration. Must be in a header file. Example:
class ClassX { DECLARE_SINGLETON(ClassX); };
#define DEFINE_SINGLETON | ( | CLASSNAME | ) |
Singleton class definition. Must be in a cpp file. Example:
Continue to define class constructor and destructor:
ClassX::ClassX() {};
ClassX::~ClassX() {};