Singleton.h 200 B

1234567891011121314151617181920
  1. #ifndef _Singleton_h_
  2. #define _Singleton_h_
  3. template < class T >
  4. class Singleton
  5. {
  6. public:
  7. static T& getInstance()
  8. {
  9. static T instance;
  10. return instance;
  11. }
  12. };
  13. #endif