Loading...
Searching...
No Matches
LocalTree/ProcessComponent.hpp
1#pragma once
2#include <Process/ProcessComponent.hpp>
3
4#include <LocalTree/LocalTreeComponent.hpp>
5
6#include <score/model/Component.hpp>
7#include <score/model/ComponentFactory.hpp>
8#include <score/plugins/ModelFactory.hpp>
9
10#include <score_lib_process_export.h>
11namespace LocalTree
12{
13class SCORE_LIB_PROCESS_EXPORT ProcessComponent
14 : public Component<Process::GenericProcessComponent<const score::DocumentContext>>
15{
16 ABSTRACT_COMPONENT_METADATA(
17 LocalTree::ProcessComponent, "0732ab51-a052-4e2e-a1f7-9bf2926c199c")
18public:
19 static constexpr bool is_unique = true;
21 ossia::net::node_base& node, Process::ProcessModel& proc,
22 const score::DocumentContext& doc, const QString& name, QObject* parent);
23
24 virtual ~ProcessComponent();
25};
26
27template <typename Process_T>
30
31class SCORE_LIB_PROCESS_EXPORT ProcessComponentFactory
33 Process::ProcessModel, score::DocumentContext,
34 LocalTree::ProcessComponentFactory>
35{
36 SCORE_ABSTRACT_COMPONENT_FACTORY(LocalTree::ProcessComponent)
37public:
39 virtual ProcessComponent* make(
40 ossia::net::node_base& parent, Process::ProcessModel& proc,
41 const score::DocumentContext& doc, QObject* paren_objt) const = 0;
42};
43
44template <typename ProcessComponent_T>
47 ProcessComponent_T, ProcessComponentFactory>
48{
49public:
50 using model_type = typename ProcessComponent_T::model_type;
51 ProcessComponent* make(
52 ossia::net::node_base& parent, Process::ProcessModel& proc,
53 const score::DocumentContext& doc, QObject* paren_objt) const override
54 {
55 return new ProcessComponent_T{
56 parent, static_cast<model_type&>(proc), doc, paren_objt};
57 }
58};
59
60class SCORE_LIB_PROCESS_EXPORT ProcessComponentFactoryList final
62 Process::ProcessModel, score::DocumentContext,
63 LocalTree::ProcessComponentFactory>
64{
65public:
67};
68}
Definition LocalTreeComponent.hpp:12
Definition LocalTree/ProcessComponent.hpp:48
Definition LocalTree/ProcessComponent.hpp:35
Definition LocalTree/ProcessComponent.hpp:64
Definition LocalTree/ProcessComponent.hpp:15
The Process class.
Definition score-lib-process/Process/Process.hpp:61
Definition ComponentFactory.hpp:29
Definition ModelFactory.hpp:8
Definition ComponentFactory.hpp:48
Local tree provides a way to extend the tree given through the Engine::Network::LocalDevice.
Definition BaseCallbackWrapper.hpp:9
Definition DocumentContext.hpp:18