score
Home
Classes
Namespaces
Files
SetCondition.hpp
1
#pragma once
2
#include <State/Expression.hpp>
3
4
#include <Scenario/Commands/ScenarioCommandFactory.hpp>
5
#include <Scenario/Document/Event/ExecutionStatus.hpp>
6
7
#include <score/command/Command.hpp>
8
#include <score/command/PropertyCommand.hpp>
9
#include <score/model/path/Path.hpp>
10
11
struct
DataStreamInput
;
12
struct
DataStreamOutput
;
13
14
namespace
Scenario
15
{
16
class
EventModel;
17
namespace
Command
18
{
19
class
SCORE_PLUGIN_SCENARIO_EXPORT
SetCondition
final :
public
score::Command
20
{
21
SCORE_COMMAND_DECL(CommandFactoryName(),
SetCondition
,
"Set an Event's condition"
)
22
public
:
23
SetCondition
(
const
EventModel
& event,
State::Expression
&& condition);
24
void
undo(
const
score::DocumentContext
& ctx)
const override
;
25
void
redo(
const
score::DocumentContext
& ctx)
const override
;
26
27
protected
:
28
void
serializeImpl(
DataStreamInput
&)
const override
;
29
void
deserializeImpl(
DataStreamOutput
&)
override
;
30
31
private
:
32
Path<EventModel>
m_path;
33
State::Expression
m_condition;
34
State::Expression
m_previousCondition;
35
};
36
37
class
SetOffsetBehavior
final :
public
score::PropertyCommand
38
{
39
SCORE_COMMAND_DECL(CommandFactoryName(),
SetOffsetBehavior
,
"Set offset behavior"
)
40
public
:
41
SetOffsetBehavior
(
const
EventModel
& event, OffsetBehavior newval);
42
};
43
}
44
}
Path
The Path class is a typesafe wrapper around ObjectPath.
Definition:
Path.hpp:52
Scenario::Command::SetCondition
Definition:
SetCondition.hpp:20
Scenario::Command::SetOffsetBehavior
Definition:
SetCondition.hpp:38
Scenario::EventModel
Definition:
EventModel.hpp:36
TreeNode< ExprData >
score::Command
The Command class.
Definition:
Command.hpp:34
score::PropertyCommand
The PropertyCommand class.
Definition:
PropertyCommand.hpp:21
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