2 #include <score/command/CommandStackFacade.hpp>
3 #include <score/command/Dispatchers/ICommandDispatcher.hpp>
4 #include <score/command/Dispatchers/SendStrategy.hpp>
15 template <
typename TheCommand>
24 template <
typename... Args>
25 void submit(Args&&... args)
29 stack().disableActions();
30 m_cmd = std::make_unique<TheCommand>(std::forward<Args>(args)...);
31 m_cmd->redo(stack().context());
35 m_cmd->update(std::forward<Args>(args)...);
36 m_cmd->redo(stack().context());
44 SendStrategy::Quiet::send(stack(), m_cmd.release());
45 stack().enableActions();
53 m_cmd->undo(stack().context());
54 stack().enableActions();
60 std::unique_ptr<TheCommand> m_cmd;
The ICommandDispatcher class.
Definition: ICommandDispatcher.hpp:21
The SingleOngoingCommandDispatcher class.
Definition: SingleOngoingCommandDispatcher.hpp:17
A small abstraction layer over the score::CommandStack.
Definition: CommandStackFacade.hpp:20