Loading...
Searching...
No Matches
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
11struct DataStreamInput;
12struct DataStreamOutput;
13
14namespace Scenario
15{
16class EventModel;
17namespace Command
18{
19class SCORE_PLUGIN_SCENARIO_EXPORT SetCondition final : public score::Command
20{
21 SCORE_COMMAND_DECL(CommandFactoryName(), SetCondition, "Set an Event's condition")
22public:
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
27protected:
28 void serializeImpl(DataStreamInput&) const override;
29 void deserializeImpl(DataStreamOutput&) override;
30
31private:
32 Path<EventModel> m_path;
33 State::Expression m_condition;
34 State::Expression m_previousCondition;
35};
36
38{
39 SCORE_COMMAND_DECL(CommandFactoryName(), SetOffsetBehavior, "Set offset behavior")
40public:
41 SetOffsetBehavior(const EventModel& event, OffsetBehavior newval);
42};
43}
44}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition SetCondition.hpp:20
Definition SetCondition.hpp:38
Definition EventModel.hpp:36
The Command class.
Definition Command.hpp:34
The PropertyCommand class.
Definition PropertyCommand.hpp:21
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18