Memento pattern

1. Usage Saves inner state of object in order to restore it in future. Usually implemented in Undo/Redo of Editors sometimes with Command Pattern. Memento in C++ implemented as Friend of Originator. Originator hide details of Memento providing narrow interface for controls. 2. UML class diagram Originator (managed a contained Memento obj), Memento(snapshot of originator […]