摘要:
/**********************************设计模式--代理模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>#include <iostream>using namespac... 阅读全文
posted @ 2010-10-18 23:56
newwy
阅读(449)
评论(1)
推荐(1)
摘要:
/**********************************设计模式--原型模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Prototype{ pu... 阅读全文
posted @ 2010-10-18 23:55
newwy
阅读(333)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--享元模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/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
阅读(392)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--外观模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Subsystem1{ p... 阅读全文
posted @ 2010-10-18 23:53
newwy
阅读(586)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--装饰模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Component{ pu... 阅读全文
posted @ 2010-10-18 23:51
newwy
阅读(294)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--适配器2模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Target{ pub... 阅读全文
posted @ 2010-10-18 23:47
newwy
阅读(215)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--适配器1模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Target{ pub... 阅读全文
posted @ 2010-10-18 23:46
newwy
阅读(251)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--桥接模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class AbstractionIm... 阅读全文
posted @ 2010-10-18 23:45
newwy
阅读(413)
评论(2)
推荐(0)
摘要:
/**********************************设计模式--组成模式实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>#include <vector>using namespace ... 阅读全文
posted @ 2010-10-18 23:41
newwy
阅读(346)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--命令实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Reciever{ publi... 阅读全文
posted @ 2010-10-18 23:38
newwy
阅读(264)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--单件实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Singleton{publi... 阅读全文
posted @ 2010-10-18 23:35
newwy
阅读(289)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--生成器实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class Product{ publi... 阅读全文
posted @ 2010-10-18 23:32
newwy
阅读(392)
评论(0)
推荐(0)
摘要:
阅读全文
posted @ 2010-10-18 23:29
newwy
阅读(334)
评论(0)
推荐(0)
摘要:
/**********************************设计模式--抽象工厂实现*C++语言*Author:WangYong*Blog:http://chuna2.787528.xyz/newwy********************************/#include <iostream>using namespace std;class AbstractProdu... 阅读全文
posted @ 2010-10-18 23:27
newwy
阅读(712)
评论(0)
推荐(0)
浙公网安备 33010602011771号