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();
(C) 2010 Radon Labs GmbH (C) 2013-2018 Individual contributors, see AUTHORS file
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(!Singleton.isvalid()); Singleton.set(this); |
#define | __ConstructInterfaceSingleton n_assert(0 == Singleton); Singleton = this; |
#define | __DestructSingleton n_assert(Singleton.isvalid()); Singleton.set(0); |
#define | __DestructInterfaceSingleton n_assert(Singleton); Singleton = 0; |
#define __ConstructSingleton n_assert(!Singleton.isvalid()); Singleton.set(this); |
#define __DeclareInterfaceSingleton | ( | type | ) |
#define __DeclareSingleton | ( | type | ) |
#define __DestructSingleton n_assert(Singleton.isvalid()); Singleton.set(0); |
#define __ImplementInterfaceSingleton | ( | type | ) |
#define __ImplementSingleton | ( | type | ) |