Undo如何工作? [英] How does Undo work?

查看:142
本文介绍了Undo如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

undo 如何工作?每次任何值都会更改时,是否复制所有受管对象?还是仅将实际更改与受影响的对象的信息进行复制?那么重的还是轻量的?

How does undo work? Does it copy all the managed objects every time any of the values change? Or does it only copy the actual changes together with an information which objects were affected? Is that heavy or lightweight?

推荐答案

几乎任何支持面向对象构造的语言的撤消机制都使用<一个href =http://en.wikipedia.org/wiki/Memento_pattern =nofollow noreferrer>美化设计模式,使之发生。

The 'undo' mechanism for pretty much any language that supports Object-Oriented constructs uses the Memento Design Pattern to make it happen.

这篇关于Undo如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆