score
Home
Classes
Namespaces
Files
AddStateProcess.hpp
1
#pragma once
2
#include <Scenario/Commands/ScenarioCommandFactory.hpp>
3
4
#include <score/command/Command.hpp>
5
#include <score/model/Identifier.hpp>
6
#include <score/model/path/Path.hpp>
7
8
#include <score_plugin_scenario_export.h>
9
10
// RENAMEME
11
12
namespace
Process
13
{
14
class
ProcessModel;
15
class
ProcessFactory;
16
}
17
namespace
Scenario
18
{
19
class
StateModel;
20
namespace
Command
21
{
22
class
SCORE_PLUGIN_SCENARIO_EXPORT
AddStateProcessToState
final :
public
score::Command
23
{
24
SCORE_COMMAND_DECL(CommandFactoryName(),
AddStateProcessToState
,
"Add a state process"
)
25
public
:
26
AddStateProcessToState
(
27
const
Scenario::StateModel
& state,
UuidKey<Process::ProcessModel>
process);
28
AddStateProcessToState
(
29
const
Scenario::StateModel
& state,
UuidKey<Process::ProcessModel>
process,
30
const
QString& data);
31
AddStateProcessToState
(
32
const
Scenario::StateModel
& state,
Id<Process::ProcessModel>
idToUse,
33
UuidKey<Process::ProcessModel>
process,
const
QString& data);
34
35
void
undo(
const
score::DocumentContext
& ctx)
const override
;
36
void
redo(
const
score::DocumentContext
& ctx)
const override
;
37
38
const
Id<Process::ProcessModel>
& processId()
const
noexcept
39
{
40
return
m_createdProcessId;
41
}
42
43
protected
:
44
void
serializeImpl(
DataStreamInput
& s)
const override
;
45
void
deserializeImpl(
DataStreamOutput
& s)
override
;
46
47
private
:
48
Path<StateModel>
m_path;
49
UuidKey<Process::ProcessModel>
m_processName;
50
QString m_data{};
51
Id<Process::ProcessModel>
m_createdProcessId{};
52
};
53
}
54
}
Path
The Path class is a typesafe wrapper around ObjectPath.
Definition:
Path.hpp:52
Scenario::Command::AddStateProcessToState
Definition:
AddStateProcess.hpp:23
Scenario::StateModel
Definition:
StateModel.hpp:63
UuidKey< Process::ProcessModel >
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