This attribute holds the undo/redo information for a model. This attribute is not persistent, so undo/redo information disappears when the model is closed. It is also a singleton, meaning that it will replace any previous attribute that has the same name and is an instance of the same base class, SingletonAttribute.
Two stacks of information are maintained - one for undo information and one for redo information. Normally, a push onto this stack puts the undo information in the undo stack. However, if the push occurs during the execution of an undo, then the information is put on the redo stack. The entries on the stack implement the UndoAction interface.
NOTE: the information in the redo stack is emptied when a new undo action is pushed onto the undo stack that was not the result of a redo being requested. This situation arises when a user requests a series of undo and redo operations, and then performs some normal undoable action. At this point the information in the redo stack is not relevant to the state of the model and so must be cleared.
@see UndoAction
@author Neil Smyth and Edward A. Lee
@version $Id: UndoStackAttribute.java,v 1.27.4.1 2008/03/25 22:32:39 cxh Exp $
@since Ptolemy II 3.1
@Pt.ProposedRating Yellow (eal)
@Pt.AcceptedRating Red (cxh)