2#include <Device/Node/DeviceNode.hpp>
4#include <Explorer/DeviceList.hpp>
5#include <Explorer/DocumentPlugin/NodeUpdateProxy.hpp>
6#include <Explorer/Explorer/DeviceExplorerModel.hpp>
7#include <Explorer/Listening/ListeningHandler.hpp>
9#include <score/plugins/documentdelegate/plugin/DocumentPlugin.hpp>
11#include <ossia/detail/hash_map.hpp>
13#include <score_plugin_deviceexplorer_export.h>
20struct network_context;
21using network_context_ptr = std::shared_ptr<network_context>;
26 "6e610e1f-9de2-4c36-90dd-0ef570002a21")
30class SCORE_PLUGIN_DEVICEEXPLORER_EXPORT DeviceDocumentPlugin final
32 ,
public Nano::Observer
34 W_OBJECT(DeviceDocumentPlugin)
35 SCORE_SERIALIZE_FRIENDS
37 MODEL_METADATA_IMPL_HPP(DeviceDocumentPlugin)
41 virtual ~DeviceDocumentPlugin();
42 template <
typename Impl>
44 :
score::SerializableDocumentPlugin{ctx, vis, parent}
52 void on_documentClosing()
override;
55 const Device::Node& rootNode()
const {
return m_rootNode; }
69 std::optional<Device::Node> loadDeviceFromNode(
const Device::Node&);
71 void setConnection(
bool);
75 DeviceExplorerModel& explorer()
const {
return *m_explorer; }
79 void reconnect(
const QString&);
81 const ossia::net::network_context_ptr& networkContext() const noexcept
88 void on_valueUpdated(
const State::Address& addr,
const ossia::value& v);
92 std::atomic_bool m_processMessages{};
93 std::thread m_asioThread;
94 ossia::net::network_context_ptr m_asioContext;
96 mutable std::unique_ptr<Explorer::ListeningHandler> m_listening;
97 DeviceExplorerModel* m_explorer{};
98 ossia::hash_map<Device::DeviceInterface*, std::vector<QMetaObject::Connection>>
102 void timerEvent(QTimerEvent* event)
override;
105 NodeUpdateProxy updateProxy{*
this};
Definition DeviceInterface.hpp:66
The DeviceList class.
Definition DeviceList.hpp:26
Definition ListeningHandler.hpp:21
Reimplement to instantiate document plug-ins.
Definition DocumentPluginCreator.hpp:25
Document plug-in with serializable data.
Definition SerializableDocumentPlugin.hpp:28
Base toolkit upon which the software is built.
Definition Application.cpp:113
The Address struct.
Definition Address.hpp:58
Definition DocumentContext.hpp:18