接口隔离

踏踏实实做事

导航

2016年10月27日 #

观察者模式

摘要: #include <iostream>#include <string>#include <vector>#include <map>using namespace std;class Observer{public: virtual void update() = 0;};typedef vect 阅读全文

posted @ 2016-10-27 17:46 接口隔离 阅读(90) 评论(0) 推荐(0) 编辑

抽象工厂模式

摘要: 工厂模式 //一个系列的不同产品 #include <iostream>#include <string>using namespace std;class IBody //说话接口类{public: virtual void speak() = 0;};class IFactory //人口工厂{ 阅读全文

posted @ 2016-10-27 11:40 接口隔离 阅读(84) 评论(0) 推荐(0) 编辑

单例模式

摘要: #include <iostream>#include <string>#include <vector>#include <map>using namespace std; class singlgSys{private: static singlgSys * pSingle; singlgSys 阅读全文

posted @ 2016-10-27 11:24 接口隔离 阅读(128) 评论(0) 推荐(0) 编辑