摘要
针对具有编辑功能软件的撤销/恢复功能无法做到操作与历史记录统一,二次开发中自有功能无法实现一体化设计的问题,设计了一种撤销/恢复通用算法。采用双向链表法记录撤销/恢复数据,将用户操作分为基本操作和复合操作,通过复合操作的方式保证操作与历史记录一致。同时,向二次开发用户提供数据代管功能,以回调函数的方式实现应用软件自有功能与平台提供功能的一体化撤销/恢复,以提高软件用户体验。
Many Application edit softwares provide undo/redo function, but they all have the problem that the current oper- ation is not consistent with history record, and users can not realize self-functions which are consist with the original func- tions. This paper use double linked list to record the data of undo/redo, divide user operations into basic operations and compound operations, adopt the compound work Mode to solve the problem that the current operation is not consistent with history record, furthermore, The paper proposes the algorithm of data hosting, the algorithm use call back function to sovle the problem that. Therefore,the algorithm proposed In this paper can improve software functions and usability.
出处
《软件导刊》
2015年第8期89-91,共3页
Software Guide