Instance.h 183 B

1234567891011121314151617
  1. #ifndef __INSTANCE_H__
  2. #define __INSTANCE_H__
  3. template < typename T >
  4. class Instance
  5. {
  6. public:
  7. static T* GetInstance()
  8. {
  9. static T _instance;
  10. return &_instance;
  11. };
  12. };
  13. #endif