随笔分类 -  设计模式

设计模式12——代理模式
摘要:用例: 阅读全文
posted @ 2018-01-07 18:20 生活的艺术 阅读(122) 评论(0) 推荐(0)
设计模式11——外观模式
摘要:用例: 阅读全文
posted @ 2018-01-07 18:19 生活的艺术 阅读(119) 评论(0) 推荐(0)
设计模式10——flyweight模式
摘要:用例: 阅读全文
posted @ 2018-01-07 18:18 生活的艺术 阅读(161) 评论(0) 推荐(0)
设计模式09——组合模式
摘要:用例: 阅读全文
posted @ 2018-01-07 18:17 生活的艺术 阅读(202) 评论(0) 推荐(0)
设计模式07——适配器模式
摘要:用例: 阅读全文
posted @ 2018-01-07 18:15 生活的艺术 阅读(96) 评论(0) 推荐(0)
设计模式06——桥接模式
摘要:用例: 阅读全文
posted @ 2018-01-07 18:11 生活的艺术 阅读(114) 评论(0) 推荐(0)
设计模式05——原型模式
摘要://prototype.cpp //原型模式:用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象 #include "gtest/gtest.h" class Prototype { public: Prototype() {} virtual ~Prototype() {} virtual Prototype* Clone() = 0; }; cla... 阅读全文
posted @ 2018-01-06 22:41 生活的艺术 阅读(153) 评论(0) 推荐(0)
设计模式01——开始总结
摘要:最近阅读了《大话设计模式》,接下来结合用例总结典型设计模式,并将代码上传到github: https://github.com/BillZPage/PatternCase.git 阅读全文
posted @ 2018-01-06 22:36 生活的艺术 阅读(103) 评论(0) 推荐(0)
设计模式02——单例模型
摘要:用例: 阅读全文
posted @ 2018-01-06 22:34 生活的艺术 阅读(154) 评论(0) 推荐(0)
设计模式03——工厂模式
摘要://factory.cpp //工厂模式 #include #include "gtest/gtest.h" class Operation { public: Operation() : x(0), y(0) {} virtual ~Operation() {} int x; int y; vi... 阅读全文
posted @ 2018-01-06 22:32 生活的艺术 阅读(122) 评论(0) 推荐(0)
设计模式04——建造者模式
摘要:实例: 阅读全文
posted @ 2018-01-06 22:31 生活的艺术 阅读(124) 评论(0) 推荐(0)