Temp-Classes/atSingleton.hpp

23 lines
236 B
C++
Raw Normal View History

2022-06-03 20:27:35 +08:00
#pragma once
namespace rage
{
template <typename T>
struct atSingleton
{
private:
T* m_basePtr{};
public:
bool isValid() const
{
return m_basePtr != nullptr;
}
T* getInstance()
{
return m_basePtr;
}
};
}