CommonLibSSE (powerof3)
Singleton.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace REX
4 {
5  template <class T>
6  class Singleton
7  {
8  public:
9  static T* GetSingleton()
10  {
11  static T singleton;
12  return std::addressof(singleton);
13  }
14 
15  protected:
16  Singleton() = default;
17  ~Singleton() = default;
18 
19  Singleton(const Singleton&) = delete;
20  Singleton(Singleton&&) = delete;
21 
22  Singleton& operator=(const Singleton&) = delete;
24  };
25 }
Definition: Singleton.h:7
~Singleton()=default
Singleton & operator=(const Singleton &)=delete
Singleton(Singleton &&)=delete
static T * GetSingleton()
Definition: Singleton.h:9
Singleton(const Singleton &)=delete
Singleton()=default
Singleton & operator=(Singleton &&)=delete
Definition: BSDirectInputManager.h:8