score
Home
Classes
Namespaces
Files
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>
14
struct
DataStreamInput
;
15
struct
DataStreamOutput
;
18
namespace
Automation
19
{
20
class
ProcessModel;
21
22
class
SCORE_PLUGIN_AUTOMATION_EXPORT
InitAutomation
final :
public
score::Command
23
{
24
SCORE_COMMAND_DECL(CommandFactoryName(),
InitAutomation
,
"InitAutomation"
)
25
public
:
26
// Note : the segments shall be sorted from start to end.
27
InitAutomation
(
28
const
ProcessModel
& obj,
const
State::AddressAccessor
& newaddr,
double
newmin,
29
double
newmax, std::vector<Curve::SegmentData>&& segments);
30
InitAutomation
(
31
const
ProcessModel
& obj,
State::AddressAccessor
&& newaddr,
double
newmin,
32
double
newmax, std::vector<Curve::SegmentData>&& segments);
33
InitAutomation
(
34
const
ProcessModel
& obj,
const
State::AddressAccessor
& newaddr,
double
newmin,
35
double
newmax);
36
37
public
:
38
void
undo(
const
score::DocumentContext
& ctx)
const override
;
39
void
redo(
const
score::DocumentContext
& ctx)
const override
;
40
41
protected
:
42
void
serializeImpl(
DataStreamInput
&)
const override
;
43
void
deserializeImpl(
DataStreamOutput
&)
override
;
44
45
private
:
46
Path<ProcessModel>
m_path;
47
State::AddressAccessor
m_addr;
48
double
m_newMin{};
49
double
m_newMax{};
50
std::vector<Curve::SegmentData> m_segments;
51
};
52
}
Automation::InitAutomation
Definition:
InitAutomation.hpp:23
Automation::ProcessModel
Definition:
AutomationModel.hpp:36
Path< ProcessModel >
score::Command
The Command class.
Definition:
Command.hpp:34
Automation
Namespace related to the Automation process.
Definition:
AutomationColors.cpp:8
DataStreamInput
Definition:
DataStreamHelpers.hpp:99
DataStreamOutput
Definition:
DataStreamHelpers.hpp:103
State::AddressAccessor
Definition:
Address.hpp:108
score::DocumentContext
Definition:
DocumentContext.hpp:18