复合模式(Composite Patten)介绍 在介绍复合模式前,我们需要定义一下什么是复合对象(Composite Object)。复合对象是包含了其它对象的对象。
基于8个网页-相关网页
The code bellow defined CreateFile and CopyFile two classes, use Command patten and Composite patten log requests, and support undoable operations.
下面的例子定义了 创建文件 和 拷贝文件 两个类,使用命令模式和组合模式记录日志,并实现逆操作。
youdao
应用推荐
模块上移
模块下移
不移动