Chinaunix首页 | 论坛 | 博客
  • 博客访问: 164479
  • 博文数量: 60
  • 博客积分: 15
  • 博客等级: 民兵
  • 技术积分: 638
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-26 10:59
个人简介

喜欢coding,因为那是一件伟大的事情,是将无生命的IC赋予灵魂的过程,让我拥有了和上帝一样的成就感。(w1c2g3@163.com)

文章分类

全部博文(60)

文章存档

2017年(7)

2016年(41)

2015年(1)

2014年(4)

2013年(7)

我的朋友

发布时间:2016-10-30 23:04:55

#include <iostream>#include <string>#include <vector>#include <sstream>using namespace std;struct MenuComponent {    virtual add(MenuComponent *menuComponent) {} .........【阅读全文】

阅读(671) | 评论(0) | 转发(0)

发布时间:2016-10-30 23:00:46

代理模式 为另一个对象提供一个替身或占位符以控制对这个对象的访问。#include <iostream>using namespace std;class CSubject {public:    CSubject() {};    virtual ~CSubject() {}.........【阅读全文】

阅读(649) | 评论(0) | 转发(0)

发布时间:2016-10-30 22:58:31

状态模式 允许对象在内部状态改变时改变它的行为,对象看起来好像修改了它的类。#include <iostream>#include <string>#include <sstream>using namespace std;class GumballMachine;class State {public:.........【阅读全文】

阅读(650) | 评论(0) | 转发(0)

发布时间:2016-10-30 22:56:24

迭代器模式 提供一种方法顺序访问一个聚合对象中的各个元素,而又不暴露其内部的表示。#include <iostream>#include <string>#include <vector>#include <sstream>using namespace std;struct MenuItem { .........【阅读全文】

阅读(719) | 评论(0) | 转发(0)

发布时间:2016-10-30 22:54:38

模板方法模式 在一个方法中定义一个算法的骨架,而将一些步骤延迟到子类中。模板方法使得子类可以在不改变算法结构的情况下,重新定义算法中的某些步骤。#include <iostream>#include <string>using namespace std;struct CaffeineBeverage {p.........【阅读全文】

阅读(602) | 评论(0) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册