CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Singleton.hpp
Go to the documentation of this file.
1 #pragma once
3 
4 namespace CYB {
5  namespace API {
10  template <class AParent> class Singleton {
11  ENABLE_TEST_HOOKS
12  protected:
13  static AParent* FSingleton;
14  protected:
21  Singleton(const bool AInit) noexcept;
23  ~Singleton();
24  };
25  };
26 };
27 #include "Singleton.inl"
~Singleton()
Destroy a singleton and nullify it's pointer.
static AParent * FSingleton
The singleton object.
Definition: Singleton.hpp:13
A class for creating static singletons.
Definition: Singleton.hpp:10
Singleton(const bool AInit) noexcept
Optionally initialize the singleton with the current object.