score
Home
Classes
Namespaces
Files
MoveProcess.hpp
1
#pragma once
2
#include <Scenario/Commands/ScenarioCommandFactory.hpp>
3
#include <Scenario/Document/Interval/Slot.hpp>
4
5
#include <score/command/Command.hpp>
6
7
namespace
Process
8
{
9
class
ProcessModel;
10
}
11
namespace
Scenario
12
{
13
class
IntervalModel;
14
}
15
namespace
Scenario::Command
16
{
17
class
MoveProcess
final :
public
score::Command
18
{
19
SCORE_COMMAND_DECL(CommandFactoryName(),
MoveProcess
,
"Move a process"
)
20
public
:
21
MoveProcess
(
22
const
IntervalModel
& src,
const
IntervalModel
& tgt,
23
Id<Process::ProcessModel>
processId,
bool
addSlot =
true
);
24
25
void
undo(
const
score::DocumentContext
& ctx)
const override
;
26
void
redo(
const
score::DocumentContext
& ctx)
const override
;
27
28
const
Path<IntervalModel>
& source()
const
{
return
m_src; }
29
const
Path<IntervalModel>
& target()
const
{
return
m_tgt; }
30
const
Id<Process::ProcessModel>
& oldProcessId()
const
{
return
m_oldId; }
31
const
Id<Process::ProcessModel>
& newProcessId()
const
{
return
m_newId; }
32
33
protected
:
34
void
serializeImpl(
DataStreamInput
&)
const override
;
35
void
deserializeImpl(
DataStreamOutput
&)
override
;
36
37
private
:
38
Path<IntervalModel>
m_src, m_tgt;
39
Id<Process::ProcessModel>
m_oldId, m_newId;
40
Scenario::Rack m_oldSmall;
41
Scenario::FullRack m_oldFull;
42
int
m_oldPos{};
43
bool
m_addedSlot{};
44
};
45
}
Path
The Path class is a typesafe wrapper around ObjectPath.
Definition:
Path.hpp:52
Scenario::Command::MoveProcess
Definition:
MoveProcess.hpp:18
Scenario::IntervalModel
Definition:
IntervalModel.hpp:50
id_base_t
The id_base_t class.
Definition:
Identifier.hpp:57
score::Command
The Command class.
Definition:
Command.hpp:34
Process
Base classes and tools to implement processes and layers.
Definition:
JSONVisitor.hpp:1324
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