Loading...
Searching...
No Matches
InitAutomation.hpp
1#pragma once
2#include <State/Address.hpp>
3
4#include <Curve/Segment/CurveSegmentData.hpp>
5
6#include <Automation/Commands/AutomationCommandFactory.hpp>
7
8#include <score/command/Command.hpp>
9#include <score/model/path/Path.hpp>
10
11#include <score_plugin_automation_export.h>
12
13#include <vector>
14struct DataStreamInput;
15struct DataStreamOutput;
18namespace Automation
19{
20class ProcessModel;
21
22class SCORE_PLUGIN_AUTOMATION_EXPORT InitAutomation final : public score::Command
23{
24 SCORE_COMMAND_DECL(CommandFactoryName(), InitAutomation, "InitAutomation")
25public:
26 // Note : the segments shall be sorted from start to end.
28 const ProcessModel& obj, const State::AddressAccessor& newaddr, double newmin,
29 double newmax, std::vector<Curve::SegmentData>&& segments);
31 const ProcessModel& obj, State::AddressAccessor&& newaddr, double newmin,
32 double newmax, std::vector<Curve::SegmentData>&& segments);
34 const ProcessModel& obj, const State::AddressAccessor& newaddr, double newmin,
35 double newmax);
36
37public:
38 void undo(const score::DocumentContext& ctx) const override;
39 void redo(const score::DocumentContext& ctx) const override;
40
41protected:
42 void serializeImpl(DataStreamInput&) const override;
43 void deserializeImpl(DataStreamOutput&) override;
44
45private:
46 Path<ProcessModel> m_path;
48 double m_newMin{};
49 double m_newMax{};
50 std::vector<Curve::SegmentData> m_segments;
51};
52}
Definition InitAutomation.hpp:23
Definition AutomationModel.hpp:36
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
The Command class.
Definition Command.hpp:34
Namespace related to the Automation process.
Definition AutomationColors.cpp:8
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition Address.hpp:108
Definition DocumentContext.hpp:18