摘要: 以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Prototype.h #pragma once class Prototype { public: virtual ~Prototype(); virtual Prototype* clone() const = 0; 阅读全文
posted @ 2019-12-20 22:22 fourmii 阅读(225) 评论(0) 推荐(0) 编辑
摘要: //以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Product.h #pragma once class Product { public: Product(); ~Product(); void ProducePart(); protected: private: 阅读全文
posted @ 2019-12-20 21:30 fourmii 阅读(347) 评论(0) 推荐(0) 编辑
摘要: //以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Singleton.h #pragma once #include<iostream> class Singleton { public: static Singleton* Instance(); protected 阅读全文
posted @ 2019-12-20 20:36 fourmii 阅读(205) 评论(0) 推荐(0) 编辑
摘要: //以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Product.h #pragma once class AbstractProductA { public: virtual ~AbstractProductA(); protected: AbstractProdu 阅读全文
posted @ 2019-12-20 20:33 fourmii 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 以下代码来源: 设计模式精解-GoF 23种设计模式解析附C++实现源码 //Product.h #pragma once class Product { public: virtual ~Product() = 0; protected: Product(); private: }; class 阅读全文
posted @ 2019-12-20 20:29 fourmii 阅读(303) 评论(0) 推荐(0) 编辑