91 #ifndef __Util_Singleton_H__ 92 #define __Util_Singleton_H__ 120 OrxVerify(T::singletonPtr_s !=
nullptr,
"T=" <<
typeid(
T).name());
121 return *T::singletonPtr_s;
127 return (T::singletonPtr_s !=
nullptr);
134 OrxVerify(T::singletonPtr_s ==
nullptr,
"T=" <<
typeid(
T).name());
135 T::singletonPtr_s =
static_cast<T*
>(
this);
141 OrxVerify(T::singletonPtr_s !=
nullptr,
"T=" <<
typeid(
T).name());
142 T::singletonPtr_s =
nullptr;
Singleton()
Constructor sets the singleton instance pointer.
Definition: Singleton.h:132
Base for singleton classes.
Definition: Singleton.h:114
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Shared library macros, enums, constants and forward declarations for the util library ...
Singleton & operator=(const Singleton &)=delete
Definition: InputPrereqs.h:78
static bool exists()
Tells whether the singleton has been created.
Definition: Singleton.h:125
#define OrxVerify(condition, errorMessage)
Works like OrxAssert in debug mode, but also checks the condition in release mode (no abort() trigger...
Definition: OrxAssert.h:78
virtual ~Singleton()
Destructor resets the singleton instance pointer.
Definition: Singleton.h:139
static T & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118
Declaration of custom assertion facilities