Loading...
Searching...
No Matches
SendStrategy.hpp
1#pragma once
2#include <score/command/CommandStackFacade.hpp>
3
4namespace SendStrategy
5{
6struct Simple
7{
8 static void send(const score::CommandStackFacade& stack, score::Command* other)
9 {
10 stack.redoAndPush(other);
11 }
12};
13
14struct Quiet
15{
16 static void send(const score::CommandStackFacade& stack, score::Command* other)
17 {
18 stack.push(other);
19 }
20};
21
23{
24 SCORE_LIB_BASE_EXPORT static void
25 send(const score::CommandStackFacade& stack, score::Command* other);
26};
27}
28namespace RedoStrategy
29{
30struct Redo
31{
32 static void redo(const score::DocumentContext& ctx, score::Command& cmd)
33 {
34 cmd.redo(ctx);
35 }
36};
37
38struct Quiet
39{
40 static void redo(const score::DocumentContext& ctx, score::Command& cmd) { }
41};
42}
The Command class.
Definition Command.hpp:34
A small abstraction layer over the score::CommandStack.
Definition CommandStackFacade.hpp:21
Definition SendStrategy.hpp:39
Definition SendStrategy.hpp:31
Definition SendStrategy.hpp:15
Definition SendStrategy.hpp:7
Definition SendStrategy.hpp:23
Definition DocumentContext.hpp:18