facade 外观模式
来源:互联网 发布:c语言分割字符串函数 编辑:程序博客网 时间:2024/06/05 06:58
#include <iostream>using namespace std;//外观模式 最简单的模式 不需要虚函数 继承等class foo{public: void show() { cout<<"foo::show()"<<endl; }};class bar{public: void show() { cout<<"bar::show()"<<endl; }};class facade{public: facade() : m_foo(new foo()),m_bar(new bar()) { } ~facade() { delete m_foo; delete m_bar; } void show() { m_foo->show(); m_bar->show(); }private: foo *m_foo; bar *m_bar;};int main(){ facade ofac; ofac.show(); return 0;}
0 0
- Facade模式(外观模式)
- 外观模式(Facade)
- 外观模式(Facade Pattern)
- 外观(Facade)模式
- 外观模式(Facade Pattern)
- Facade(外观)模式
- Facade外观模式
- facade(外观模式)
- Facade 外观模式
- 外观模式(Facade)
- Facade外观模式
- Facade外观模式
- 外观模式Facade
- 外观模式(Facade)
- Facade(外观)模式
- Facade外观模式
- 外观模式(Facade)
- 外观模式(Facade)
- 写给本命年24岁的自己和你:这一年决定你的未来
- 黑马程序员---java学习笔记之集合
- decorator 装饰模式
- ARM异常中断
- poj--1011sticks
- facade 外观模式
- 错误:'release' is unavailable: not available in automatic reference counting mode..(Xcode4.2.1+iOS5.0
- jms基础概念和应用场景
- UdpDemo
- mysql安装过程
- MySql 导入CSV数据
- [Sparrow OS 设计文档连载(二)] User Guide - Demo
- spring 使用注解来调度定时任务
- pop弹出 dialog对话框