c++常用设计模式实现


单例模式:

namespace downgadget
{
	class Downloader_c {
	public:
		static Downloader_c* Instance(){
			static Downloader_c* s_downloader = new Downloader_c();
			return s_downloader;
		}

	private:
		Downloader_c(){}	                   		// Constructor
		Downloader_c(Downloader_c const&);    		// Don't Implement
		void operator=(Downloader_c const&); 		// Don't implement

	private:

	};

}










你可能感兴趣的:(设计模式,cc++)