Nebula
|
Provides helper macros to implement singleton objects:
Get a pointer to a singleton object using the static Instance() method:
Core::Server* coreServer = Core::Server::Instance();
#include "core/types.h"
Go to the source code of this file.
Macros | |
#define | __DeclareSingleton(type) |
#define | __DeclareInterfaceSingleton(type) |
#define | __ImplementSingleton(type) |
#define | __ImplementInterfaceSingleton(type) |
#define | __ConstructSingleton n_assert(nullptr == Singleton); Singleton = this; |
#define | __ConstructInterfaceSingleton n_assert(nullptr == Singleton); Singleton = this; |
#define | __DestructSingleton n_assert(Singleton); Singleton = nullptr; |
#define | __DestructInterfaceSingleton n_assert(Singleton); Singleton = nullptr; |
#define __DeclareInterfaceSingleton | ( | type | ) |
#define __DeclareSingleton | ( | type | ) |
#define __ImplementInterfaceSingleton | ( | type | ) |
#define __ImplementSingleton | ( | type | ) |