2#include <State/Message.hpp>
4#include <Process/GenericProcessFactory.hpp>
5#include <Process/Process.hpp>
7#include <Explorer/Explorer/DeviceExplorerModel.hpp>
9#include <ControlSurface/Metadata.hpp>
11#include <ossia/detail/hash_map.hpp>
13#include <score_plugin_controlsurface_export.h>
17struct FullAddressAccessorSettings;
26template <
typename Identifier,
typename Func>
38 &explorer, &Explorer::DeviceExplorerModel::nodeChanged,
this,
40 if(
auto it = available.find(n); it != available.end())
49 auto node = Device::try_getNodeFromAddress(model.rootNode(), addr);
52 available[node] = {std::move(addr), std::move(identifier)};
56 missing.push_back({std::move(addr), std::move(identifier)});
62 auto it = ossia::find_if(
63 available, [&](
const auto& pair) {
return pair.second.accessor == addr; });
64 if(it != available.end())
71 = ossia::find_if(missing, [&](
const auto& p) {
return p.accessor == addr; });
72 if(it != missing.end())
83 ossia::hash_map<Device::Node*, AvailableNode> available;
84 std::vector<AvailableNode> missing;
88SCORE_PLUGIN_CONTROLSURFACE_EXPORT
95 SCORE_SERIALIZE_FRIENDS
100 using address_map = ossia::hash_map<int32_t, State::AddressAccessor>;
103 template <
typename Impl>
104 Model(Impl& vis, QObject* parent)
106 , m_observer{Explorer::deviceExplorerFromObject(*parent), Apply{*
this}}
113 using Process::ProcessModel::inlets;
114 using Process::ProcessModel::outlets;
124 const address_map& outputAddresses()
const noexcept {
return m_outputAddresses; }
127 QString prettyName()
const noexcept override;
129 void setDurationAndScale(
const TimeVal& newDuration)
noexcept override;
130 void setDurationAndGrow(
const TimeVal& newDuration)
noexcept override;
131 void setDurationAndShrink(
const TimeVal& newDuration)
noexcept override;
133 address_map m_outputAddresses;
Definition score-plugin-controlsurface/ControlSurface/Process.hpp:94
Definition DeviceExplorerModel.hpp:67
Definition GenericProcessFactory.hpp:15
The Process class.
Definition score-lib-process/Process/Process.hpp:75
The id_base_t class.
Definition Identifier.hpp:59
Manipulation of Devices from Qt.
Definition AddressSettings.cpp:14
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
@ ControlSurface
The process supports being exposed to the ControlSurface.
Definition ProcessFlags.hpp:37
Definition score-plugin-controlsurface/ControlSurface/Process.hpp:78
Definition score-plugin-controlsurface/ControlSurface/Process.hpp:28
Definition AddressSettings.hpp:131
Definition PortForward.hpp:23
Definition PortForward.hpp:27
Definition Address.hpp:108
The Address struct.
Definition Address.hpp:58
Definition TimeValue.hpp:21