Loading...
Searching...
No Matches
MoveEventOnCreationMeta.hpp
1#pragma once
2
3#include <Process/ExpandMode.hpp>
4#include <Process/TimeValue.hpp>
5
6#include <Scenario/Commands/Scenario/Displacement/SerializableMoveEvent.hpp>
7#include <Scenario/Commands/ScenarioCommandFactory.hpp>
8
9#include <score/model/Identifier.hpp>
10#include <score/model/path/Path.hpp>
11
12#include <score_plugin_scenario_export.h>
13
14#include <memory>
15struct DataStreamInput;
16struct DataStreamOutput;
17
18namespace Scenario
19{
20class EventModel;
21class ProcessModel;
22namespace Command
23{
24
25class SCORE_PLUGIN_SCENARIO_EXPORT MoveEventOnCreationMeta final
27{
28 SCORE_COMMAND_DECL(
29 CommandFactoryName(), MoveEventOnCreationMeta, "Move an event on creation")
30public:
32 const Scenario::ProcessModel& scenarioPath, Id<EventModel> eventId,
33 TimeVal newDate, ExpandMode mode);
35
36 void undo(const score::DocumentContext& ctx) const override;
37 void redo(const score::DocumentContext& ctx) const override;
38
39 const Path<Scenario::ProcessModel>& path() const override;
40 void update(
41 Scenario::ProcessModel& scenario, const Id<EventModel>& eventId,
42 const TimeVal& newDate, double, ExpandMode mode, LockMode lm) override;
43
44 // Command interface
45protected:
46 void serializeImpl(DataStreamInput&) const override;
47 void deserializeImpl(DataStreamOutput&) override;
48
49private:
50 std::unique_ptr<SerializableMoveEvent> m_moveEventImplementation;
51};
52}
53}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition MoveEventOnCreationMeta.hpp:27
Definition SerializableMoveEvent.hpp:20
The core hierarchical and temporal process of score.
Definition ScenarioModel.hpp:37
The id_base_t class.
Definition Identifier.hpp:57
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition TimeValue.hpp:21
Definition DocumentContext.hpp:18