Loading...
Searching...
No Matches
SetControlValue.hpp
1#pragma once
2#include <State/Value.hpp>
3#include <State/ValueSerialization.hpp>
4
5#include <Process/Commands/ProcessCommandFactory.hpp>
6#include <Process/Dataflow/Port.hpp>
7
8#include <score/model/path/PathSerialization.hpp>
9
10namespace Process
11{
12class SCORE_LIB_PROCESS_EXPORT SetControlValue final : public score::Command
13{
14 SCORE_COMMAND_DECL(Process::CommandFactoryName(), SetControlValue, "Set a control")
15
16public:
17 SetControlValue(const Process::ControlInlet& obj, ossia::value newval);
18 virtual ~SetControlValue();
19
20 void undo(const score::DocumentContext& ctx) const final override;
21 void redo(const score::DocumentContext& ctx) const final override;
22 void update(const Process::ControlInlet& obj, ossia::value newval);
23
24protected:
25 void serializeImpl(DataStreamInput& stream) const final override;
26 void deserializeImpl(DataStreamOutput& stream) final override;
27
28private:
30 ossia::value m_old, m_new;
31};
32
33class SCORE_LIB_PROCESS_EXPORT SetControlOutletValue final : public score::Command
34{
35 SCORE_COMMAND_DECL(
36 Process::CommandFactoryName(), SetControlOutletValue, "Set a control")
37
38public:
39 SetControlOutletValue(const Process::ControlOutlet& obj, ossia::value newval);
40 virtual ~SetControlOutletValue();
41
42 void undo(const score::DocumentContext& ctx) const final override;
43 void redo(const score::DocumentContext& ctx) const final override;
44 void update(const Process::ControlOutlet& obj, ossia::value newval);
45
46protected:
47 void serializeImpl(DataStreamInput& stream) const final override;
48 void deserializeImpl(DataStreamOutput& stream) final override;
49
50private:
52 ossia::value m_old, m_new;
53};
54}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition Port.hpp:203
Definition Port.hpp:425
Definition SetControlValue.hpp:34
Definition SetControlValue.hpp:13
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 DocumentContext.hpp:18