33 static T& GetInstance()
35 assert(m_instance !=
nullptr);
39 static T* GetInstancePointer()
41 assert(m_instance !=
nullptr);
45 static bool IsCreated()
47 return m_instance !=
nullptr;
52 assert(m_instance ==
nullptr);
53 m_instance =
static_cast<T *
>(
this);
62 static void ReplaceInstance(T* newInstance)
64 assert(newInstance !=
nullptr);
66 if (m_instance !=
nullptr)
69 m_instance = newInstance;
Definition: singleton.h:27