Loading...
Searching...
No Matches
EditPort.hpp
1#pragma once
2#include <State/Address.hpp>
3
4#include <Device/Address/AddressSettings.hpp>
5
6#include <Process/Commands/ProcessCommandFactory.hpp>
7#include <Process/Dataflow/Port.hpp>
8#include <Process/Process.hpp>
9
10#include <score/command/Command.hpp>
11#include <score/command/PropertyCommand.hpp>
12#include <score/model/path/Path.hpp>
13
14namespace Process
15{
16
17class SCORE_LIB_PROCESS_EXPORT ChangePortSettings final : public score::Command
18{
19 SCORE_COMMAND_DECL(
20 Process::CommandFactoryName(), ChangePortSettings, "Edit a node port")
21public:
23
24 void undo(const score::DocumentContext& ctx) const override;
25 void redo(const score::DocumentContext& ctx) const override;
26
27protected:
28 void serializeImpl(DataStreamInput& s) const override;
29 void deserializeImpl(DataStreamOutput& s) override;
30
31private:
32 Path<Process::Port> m_model;
33
35};
36
37}
38
39PROPERTY_COMMAND_T(
40 Process, SetPropagate, AudioOutlet::p_propagate, "Set port propagation")
41SCORE_COMMAND_DECL_T(Process::SetPropagate)
42
43PROPERTY_COMMAND_T(Process, ChangePortAddress, Port::p_address, "Set port address")
44SCORE_COMMAND_DECL_T(Process::ChangePortAddress)
45
46PROPERTY_COMMAND_T(Process, SetValue, ControlInlet::p_value, "Set port value")
47SCORE_COMMAND_DECL_T(Process::SetValue)
48
49PROPERTY_COMMAND_T(Process, SetGain, AudioOutlet::p_gain, "Set port gain")
50SCORE_COMMAND_DECL_T(Process::SetGain)
51
52PROPERTY_COMMAND_T(Process, SetPan, AudioOutlet::p_pan, "Set port pan")
53SCORE_COMMAND_DECL_T(Process::SetPan)
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition EditPort.hpp:18
Definition Port.hpp:102
The Command class.
Definition Command.hpp:34
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition AddressSettings.hpp:131
Definition DocumentContext.hpp:18