NRE_Singleton.hpp
Go to the documentation of this file.
1 
10  #pragma once
11 
12  #include "../Interfaces/Uncopyable/NRE_Uncopyable.hpp"
13 
18  namespace NRE {
23  namespace Utility {
24 
29  template <class T>
30  class Singleton : public Uncopyable<Singleton<T>> {
31  friend T;
32  protected: // Methods
33  //## Constructor ##//
37  Singleton() = default;
38 
39  //## Deconstructor ##//
43  ~Singleton() = default;
44 
45  public: // Static
50  static T& get();
51 
52  };
53  }
54  }
55 
56  #include "NRE_Singleton.tpp"
Describe a singleton object.
Definition: NRE_Singleton.hpp:30
Describe an un-copyable object.
Definition: NRE_Uncopyable.hpp:28
The NearlyRealEngine&#39;s global namespace.
Utility&#39;s API.