📄 testbridge.cpp
字号:
/** * testbridge.cpp */#include "bridge.h"void main(){ Abstraction* object = new Abstraction(); Implementor* implA = new ConcreteImplementorA(); Implementor* implB = new ConcreteImplementorB(); /** * Give the implmentor to the abstraction. */ object -> setImplementor( implA ); object -> operation(); /** * Change the implementor during runtime. */ object -> setImplementor( implB ); object -> operation(); /** * Clean-up. */ delete implA; delete implB; delete object;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -