ChangeAddresses.hpp
1 #pragma once
2 #include <Device/Address/AddressSettings.hpp>
3 
4 #include <Mapping/Commands/MappingCommandFactory.hpp>
5 
6 #include <score/command/Command.hpp>
7 #include <score/model/path/Path.hpp>
8 
9 struct DataStreamInput;
10 struct DataStreamOutput;
11 namespace State
12 {
13 struct Address;
14 } // namespace score
15 
16 namespace Mapping
17 {
18 class ProcessModel;
19 class ChangeSourceAddress final : public score::Command
20 {
21  SCORE_COMMAND_DECL(
22  MappingCommandFactoryName(), ChangeSourceAddress, "ChangeSourceAddress")
23 public:
25 
26 public:
27  void undo(const score::DocumentContext& ctx) const override;
28  void redo(const score::DocumentContext& ctx) const override;
29 
30 protected:
31  void serializeImpl(DataStreamInput&) const override;
32  void deserializeImpl(DataStreamOutput&) override;
33 
34 private:
35  Path<ProcessModel> m_path;
37 };
38 
39 class ChangeTargetAddress final : public score::Command
40 {
41  SCORE_COMMAND_DECL(
42  MappingCommandFactoryName(), ChangeTargetAddress, "ChangeTargetAddress")
43 public:
45 
46 public:
47  void undo(const score::DocumentContext& ctx) const override;
48  void redo(const score::DocumentContext& ctx) const override;
49 
50 protected:
51  void serializeImpl(DataStreamInput&) const override;
52  void deserializeImpl(DataStreamOutput&) override;
53 
54 private:
55  Path<ProcessModel> m_path;
57 };
58 }
Definition: ChangeAddresses.hpp:20
Definition: ChangeAddresses.hpp:40
Definition: MappingModel.hpp:27
The Command class.
Definition: Command.hpp:34
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33
Definition: DataStreamHelpers.hpp:99
Definition: DataStreamHelpers.hpp:103
Definition: AddressSettings.hpp:131
Definition: DocumentContext.hpp:18