score
Home
Classes
Namespaces
Files
ClearState.hpp
1
#pragma once
2
#include <State/Message.hpp>
3
4
#include <Scenario/Commands/ScenarioCommandFactory.hpp>
5
6
#include <score/command/Command.hpp>
7
#include <score/model/path/Path.hpp>
8
9
struct
DataStreamInput
;
10
struct
DataStreamOutput
;
11
namespace
Scenario
12
{
13
class
StateModel;
14
15
namespace
Command
16
{
17
class
ClearState
final :
public
score::Command
18
{
19
SCORE_COMMAND_DECL(CommandFactoryName(),
ClearState
,
"Clear a state"
)
20
public
:
21
ClearState
(
const
StateModel
& path);
22
void
undo(
const
score::DocumentContext
& ctx)
const override
;
23
void
redo(
const
score::DocumentContext
& ctx)
const override
;
24
25
protected
:
26
void
serializeImpl(
DataStreamInput
&)
const override
;
27
void
deserializeImpl(
DataStreamOutput
&)
override
;
28
29
private
:
30
Path<StateModel>
m_path;
31
32
State::MessageList m_oldState;
33
};
34
}
35
}
Path
The Path class is a typesafe wrapper around ObjectPath.
Definition:
Path.hpp:52
Scenario::Command::ClearState
Definition:
ClearState.hpp:18
Scenario::StateModel
Definition:
StateModel.hpp:63
score::Command
The Command class.
Definition:
Command.hpp:34
Scenario
Main plug-in of score.
Definition:
score-plugin-dataflow/Dataflow/PortItem.hpp:14
DataStreamInput
Definition:
DataStreamHelpers.hpp:99
DataStreamOutput
Definition:
DataStreamHelpers.hpp:103
score::DocumentContext
Definition:
DocumentContext.hpp:18