BWAPI
|
00001 #pragma once 00002 00003 template<class T> 00004 class Singleton 00005 { 00006 public: 00007 static T& Instance() 00008 { 00009 static T instance; 00010 return instance; 00011 } 00012 00013 protected: 00014 Singleton(); 00015 ~Singleton(); 00016 00017 private: 00018 Singleton(const Singleton&); 00019 Singleton& operator=(const Singleton&); 00020 };