![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式[
文章平均质量分 75
fssssssss
nju
展开
-
策略模式 ----- 排序例子
策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换。策略模式让算法独立于使用它的客户而独立变化。(原文:The Strategy Pattern defines a family of algorithms,encapsulates each one,and makes them interchangeable. Strategy lets the algorithm v原创 2012-05-07 15:12:19 · 1240 阅读 · 0 评论 -
Singleton
#include class Person { private: static Person *singlePerson; Person() { std::cout<<"Create Person"<<std::endl; } ~Person() { std::cout<<"Delete Person"<<std::endl; } class CGarInner{//原创 2015-09-16 16:22:13 · 371 阅读 · 0 评论