70 std::shared_ptr<std::vector<OperationPtr>>
undo();
75 std::shared_ptr<std::vector<OperationPtr>>
redo();
89 void push(
const std::shared_ptr<std::vector<OperationPtr>>& operations);
100 std::unique_ptr<std::vector<UndoActionPtr>> undoStack;
101 std::unique_ptr<std::vector<UndoActionPtr>> redoStack;
std::shared_ptr< std::vector< OperationPtr > > redo()
Goes one step forward in the history and returns the Operations need to redo.
bool canUndo()
Returns the possibility to undo a Action.
UndoRedoStack()
A constructor.
void push(const std::shared_ptr< std::vector< OperationPtr > > &operations)
Adds a Action to the history.
bool canRedo()
Returns the possibility to redo a Action.
std::shared_ptr< std::vector< OperationPtr > > undo()
Goes one step back in the history and returns the Operations need to redo.
void clear()
Removes all actions from the history.
void updateObjectId(std::string oldId, std::string newId)
Swaps oldId and newId in all Operations saved in this class.