newwy
奋斗在IT路上的小蜗牛。一步一步往上爬,爬到小牛,在到大牛,然后是神牛,然后是犇,然后就可以离开IT行业,回归大自然了。 远离IT,珍爱生命!!! 记录学习的点滴。
摘要: /**********************************设计模式--代理模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>#include <iostream>using namespac... 阅读全文
posted @ 2010-10-18 23:56 newwy 阅读(434) 评论(1) 推荐(1) 编辑
摘要: /**********************************设计模式--原型模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Prototype{ pu... 阅读全文
posted @ 2010-10-18 23:55 newwy 阅读(322) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--享元模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include #include #include #include using namespace std;class Flyweight{ public: virtual ~Flyweight(){} virtual void Operation(const string & extrinsicState){} 阅读全文
posted @ 2010-10-18 23:54 newwy 阅读(383) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--外观模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Subsystem1{ p... 阅读全文
posted @ 2010-10-18 23:53 newwy 阅读(573) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--装饰模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Component{ pu... 阅读全文
posted @ 2010-10-18 23:51 newwy 阅读(281) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--适配器2模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Target{ pub... 阅读全文
posted @ 2010-10-18 23:47 newwy 阅读(204) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--适配器1模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Target{ pub... 阅读全文
posted @ 2010-10-18 23:46 newwy 阅读(240) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--桥接模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class AbstractionIm... 阅读全文
posted @ 2010-10-18 23:45 newwy 阅读(396) 评论(2) 推荐(0) 编辑
摘要: /**********************************设计模式--组成模式实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>#include <vector>using namespace ... 阅读全文
posted @ 2010-10-18 23:41 newwy 阅读(333) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--命令实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Reciever{ publi... 阅读全文
posted @ 2010-10-18 23:38 newwy 阅读(253) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--单件实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Singleton{publi... 阅读全文
posted @ 2010-10-18 23:35 newwy 阅读(282) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--生成器实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class Product{ publi... 阅读全文
posted @ 2010-10-18 23:32 newwy 阅读(370) 评论(0) 推荐(0) 编辑
摘要:  阅读全文
posted @ 2010-10-18 23:29 newwy 阅读(323) 评论(0) 推荐(0) 编辑
摘要: /**********************************设计模式--抽象工厂实现*C++语言*Author:WangYong*Blog:http://www.cnblogs.com/newwy********************************/#include <iostream>using namespace std;class AbstractProdu... 阅读全文
posted @ 2010-10-18 23:27 newwy 阅读(696) 评论(0) 推荐(0) 编辑