score-plugin-automation/Automation/Commands/ChangeAddress.hpp
1 #pragma once
2 #include <Device/Address/AddressSettings.hpp>
3 
4 #include <Curve/Palette/CurvePoint.hpp>
5 
6 #include <Automation/Commands/AutomationCommandFactory.hpp>
7 
8 #include <score/command/Command.hpp>
9 #include <score/model/path/Path.hpp>
10 
11 struct DataStreamInput;
12 struct DataStreamOutput;
13 namespace State
14 {
15 struct Address;
16 } // namespace score
17 
18 namespace Automation
19 {
20 class ProcessModel;
21 class ChangeAddress final : public score::Command
22 {
23  SCORE_COMMAND_DECL(CommandFactoryName(), ChangeAddress, "ChangeAddress")
24 public:
25  ChangeAddress(const ProcessModel& autom, const State::AddressAccessor& newval);
27  ChangeAddress(const ProcessModel& autom, const Device::FullAddressSettings& newval);
28 
29 public:
30  void undo(const score::DocumentContext& ctx) const override;
31  void redo(const score::DocumentContext& ctx) const override;
32 
33 protected:
34  void serializeImpl(DataStreamInput&) const override;
35  void deserializeImpl(DataStreamOutput&) override;
36 
37 private:
38  Path<ProcessModel> m_path;
40 };
41 }
Definition: score-plugin-automation/Automation/Commands/ChangeAddress.hpp:22
Definition: AutomationModel.hpp:36
The Command class.
Definition: Command.hpp:34
Namespace related to the Automation process.
Definition: AutomationColors.cpp:8
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33
Definition: DataStreamHelpers.hpp:99
Definition: DataStreamHelpers.hpp:103
Definition: AddressSettings.hpp:131
Definition: AddressSettings.hpp:62
Definition: Address.hpp:108
Definition: DocumentContext.hpp:18