You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #pragma once
-
- #include <memory>
- #include <list>
-
- class SqCommand;
-
- class UndoRedoStack
- {
- public:
- bool canUndo() const;
- bool canRedo() const;
-
- // execute the command, make undo record
- void execute(std::shared_ptr<SqCommand>);
- void undo();
- void redo();
-
- private:
-
-
-
- std::list<std::shared_ptr<SqCommand>> undoList;
- std::list<std::shared_ptr<SqCommand>> redoList;
-
- };
-
- using UndoRedoStackPtr = std::shared_ptr<UndoRedoStack>;
|