LocalTreeDocumentPlugin.hpp
1 #pragma once
2 
3 #include <LocalTree/Device/LocalDevice.hpp>
4 
5 #include <score/plugins/documentdelegate/plugin/DocumentPlugin.hpp>
6 #include <score/tools/Metadata.hpp>
7 
8 #include <score_plugin_engine_export.h>
9 namespace score
10 {
11 class ModelMetadata;
12 }
13 
14 namespace Scenario
15 {
16 class ProcessModel;
17 class IntervalModel;
18 class EventModel;
19 class TimeSyncModel;
20 class StateModel;
21 }
22 
23 namespace LocalTree
24 {
25 class Interval;
26 class SCORE_PLUGIN_ENGINE_EXPORT DocumentPlugin final : public score::DocumentPlugin
27 {
28 public:
29  DocumentPlugin(const score::DocumentContext& doc, QObject* parent);
30 
31  ~DocumentPlugin();
32 
33  void init();
34 
35  void on_documentClosing() override;
36  ossia::net::device_base& device() { return *m_localDevice; }
37  const ossia::net::device_base& device() const { return *m_localDevice; }
38 
39  Protocols::LocalDevice& localDevice() { return m_localDeviceWrapper; }
40 
41 private:
42  void create();
43  void cleanup();
44 
45  Interval* m_root{};
46  std::unique_ptr<ossia::net::device_base> m_localDevice;
47  Protocols::LocalDevice m_localDeviceWrapper;
48 };
49 }
Definition: LocalTreeDocumentPlugin.hpp:27
Definition: LocalTree/IntervalComponent.hpp:47
Definition: LocalDevice.hpp:25
Extend a document with custom data and systems.
Definition: DocumentPluginBase.hpp:24
Local tree provides a way to extend the tree given through the Engine::Network::LocalDevice.
Definition: BaseCallbackWrapper.hpp:9
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DocumentContext.hpp:18