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>
20 struct network_context;
21 using network_context_ptr = std::shared_ptr<network_context>;
26 "6e610e1f-9de2-4c36-90dd-0ef570002a21")
30 class 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}
53 const Device::Node& rootNode()
const {
return m_rootNode; }
67 std::optional<Device::Node> loadDeviceFromNode(
const Device::Node&);
69 void setConnection(
bool);
73 DeviceExplorerModel& explorer()
const {
return *m_explorer; }
77 void reconnect(
const QString&);
79 const ossia::net::network_context_ptr& networkContext() const noexcept
86 void on_valueUpdated(
const State::Address& addr,
const ossia::value& v);
90 std::atomic_bool m_processMessages{};
91 std::thread m_asioThread;
92 ossia::net::network_context_ptr m_asioContext;
94 mutable std::unique_ptr<Explorer::ListeningHandler> m_listening;
95 DeviceExplorerModel* m_explorer{};
96 ossia::hash_map<Device::DeviceInterface*, std::vector<QMetaObject::Connection>>
100 void timerEvent(QTimerEvent* event)
override;
103 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:90
The Address struct.
Definition: Address.hpp:58
Definition: DocumentContext.hpp:18