isingleton.h
Go to the documentation of this file.
1 #ifndef DNAI_INTERFACES_ISINGLETON_H
2 #define DNAI_INTERFACES_ISINGLETON_H
3 
4 namespace dnai
5 {
6  namespace interfaces
7  {
8  template<class T>
9  class ISingleton
10  {
11  protected:
12  ISingleton() = default;
13 
14  public:
15  // delete copy and move constructors and assign operators
16  ISingleton(ISingleton const&) = delete; // Copy construct
17  ISingleton(ISingleton&&) = delete; // Move construct
18  ISingleton& operator=(ISingleton const&) = delete; // Copy assign
19  ISingleton& operator=(ISingleton &&) = delete; // Move assign
20  virtual ~ISingleton() = default;
21  // static T &instance()
22  // {
24  // }
25  protected:
26  void *m_instance;
27  };
28  }
29 }
30 
31 #endif // DNAI_INTERFACES_ISINGLETON_H
virtual ~ISingleton()=default
void * m_instance
Definition: isingleton.h:26
ISingleton & operator=(ISingleton const &)=delete
Definition: api.h:13
Definition: isingleton.h:9