Scid
4.7.0
|
A container useful for implementing a undo-redo behavior. More...
#include <containers.h>
Public Member Functions | |
~UndoRedo () | |
void | clear () |
size_t | undoSize () const |
size_t | redoSize () const |
void | store (TElem *current) |
Stores a copy of an element into the undo queue. More... | |
TElem * | undo (TElem *current) |
Retrieve the last element from the undo queue. More... | |
TElem * | redo (TElem *current) |
Retrieve the last element from the redo queue. More... | |
A container useful for implementing a undo-redo behavior.
UNDOMAX: max number of copies to store. Typical use: store(obj_ptr); // (1) modify obj; obj_ptr = undo(obj_ptr); // obj_ptr now contains the copy of (1)
Definition at line 33 of file containers.h.
Definition at line 38 of file containers.h.
|
inline |
Definition at line 39 of file containers.h.
|
inline |
Retrieve the last element from the redo queue.
current | pointer to the current element; it will be stored into the undo queue. |
Definition at line 76 of file containers.h.
|
inline |
Definition at line 44 of file containers.h.
|
inline |
Stores a copy of an element into the undo queue.
Deletes all the objects of the redo queue.
current | the element to clone and store. |
Definition at line 51 of file containers.h.
|
inline |
Retrieve the last element from the undo queue.
current | pointer to the current element; it will be stored into the redo queue. |
Definition at line 67 of file containers.h.
|
inline |
Definition at line 43 of file containers.h.