DIFF METHOD FOR IMPLEMENTING UNDO STACK OF THE RECENT USER ACTIONS

A.L. Masyuk

Èlektron. model. 2017, 39(1):91-104
https://doi.org/10.15407/emodel.39.01.091

ABSTRACT

This article deals with the most common patternsMemento and Command which are used nowadays in order to implement a recent user actions undo stack. The new method Diff is suggested, which combines advantages of the both patterns and allows quite simple and common implementation of the undo stack for a developer. Themethod has been practically tested while implementing a visual editor of the mine ventilation model graphs (as well as some other applications). Usage of the applications has proved the efficiency of theDiffmethod by such criteria as speed of response,memory consumption, code reuse and difficulty of the final implementation.

KEYWORDS

visual editing, undo stack, graphical interface.

REFERENCES

1. Gamma, E., Helm, R., Johnson, R. and Vlissides, J. (1994), Priyomy obektno-orientirovannogo proektirovaniya. Patterny proektirovaniya [Design patterns. Elements of reusable objectoriented software], Addison-Wesley, Piter.
2. Patterny proektirovaniya [Design patterns], available at: http://www.cpp-reference.ru.
3. Masyuk, A.L. (2016), “Implementation of undo-redo stack of visual data model editors”, Trudy 5-oi Mezhdunarodnoi konferentsii Modelorovanie-2016 [Proceedings of the 5th International Scientific Conference Simulation-2016], Pukhov Institute for Problems of Modeling in Energy Engineering, NAS of Ukraine, Kiev, pp. 101-104, ISBN 978-9660279285.

Full text: PDF (in Russian)