score
Home
Classes
Namespaces
Files
InsertContentInState.hpp
1
#pragma once
2
#include <Process/State/MessageNode.hpp>
3
4
#include <Scenario/Commands/ScenarioCommandFactory.hpp>
5
6
#include <score/command/Command.hpp>
7
#include <score/model/path/Path.hpp>
8
9
#include <ossia/detail/json.hpp>
10
11
namespace
Scenario
12
{
13
class
StateModel;
14
namespace
Command
15
{
16
class
InsertContentInState
final :
public
score::Command
17
{
18
SCORE_COMMAND_DECL(
19
CommandFactoryName(),
InsertContentInState
,
"Insert content in a state"
)
20
21
public
:
22
InsertContentInState
(
23
const
rapidjson::Value& stateData,
const
Scenario::StateModel
& state);
24
25
void
undo(
const
score::DocumentContext
& ctx)
const override
;
26
void
redo(
const
score::DocumentContext
& ctx)
const override
;
27
28
private
:
29
void
serializeImpl(
DataStreamInput
& s)
const override
;
30
void
deserializeImpl(
DataStreamOutput
& s)
override
;
31
32
Process::MessageNode
m_oldNode;
33
Process::MessageNode
m_newNode;
34
Path<StateModel>
m_state;
35
};
36
}
37
}
Path
The Path class is a typesafe wrapper around ObjectPath.
Definition:
Path.hpp:52
Scenario::Command::InsertContentInState
Definition:
InsertContentInState.hpp:17
Scenario::StateModel
Definition:
StateModel.hpp:63
TreeNode< StateNodeData >
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