7 #ifndef __FWCOMMAND_UNDOREDOMANAGER_HPP__ 8 #define __FWCOMMAND_UNDOREDOMANAGER_HPP__ 10 #include "fwCommand/config.hpp" 11 #include "fwCommand/ICommand.hpp" 32 FWCOMMAND_API
UndoRedoManager(
size_t maxMemory = std::numeric_limits<size_t>::max(),
33 size_t maxCommands = std::numeric_limits<size_t>::max());
42 FWCOMMAND_API
bool enqueue( ICommand::sptr cmd );
49 FWCOMMAND_API
bool redo();
56 FWCOMMAND_API
bool undo();
59 FWCOMMAND_API
bool canUndo()
const;
62 FWCOMMAND_API
bool canRedo()
const;
65 FWCOMMAND_API
void clear();
68 FWCOMMAND_API
size_t getCommandCount()
const;
71 FWCOMMAND_API
void setCommandCount(
size_t cmdCount);
74 FWCOMMAND_API
size_t getHistorySize()
const;
77 FWCOMMAND_API
void setHistorySize(
size_t histSize);
81 typedef std::deque<ICommand::sptr> CommandHistoryType;
93 CommandHistoryType m_commandQueue;
96 std::int64_t m_commandIndex;
105 #endif // __FWCOMMAND_UNDOREDOMANAGER_HPP__ Keep track of commands, undo/redo them.
The namespace fwCommand contains classes describing and managing commands.