2 #include <Process/ExecutionComponent.hpp>
3 #include <Process/ExecutionContext.hpp>
4 #include <Process/ExecutionTransaction.hpp>
5 #include <Process/Process.hpp>
6 #include <Process/ProcessComponent.hpp>
8 #include <score/model/ComponentFactory.hpp>
9 #include <score/plugins/ModelFactory.hpp>
11 #include <ossia/dataflow/graph_node.hpp>
12 #include <ossia/editor/scenario/time_process.hpp>
16 #include <score_lib_process_export.h>
21 #if __cpp_lib_concepts >= 202002L
47 ,
public std::enable_shared_from_this<ProcessComponent>
50 ABSTRACT_COMPONENT_METADATA(
54 static constexpr
bool is_unique =
true;
61 virtual void lazy_init();
65 virtual void cleanup();
66 virtual void stop() { process().stopExecution(); }
68 const std::shared_ptr<ossia::time_process>& OSSIAProcessPtr()
70 return m_ossia_process;
72 ossia::time_process& OSSIAProcess()
const {
return *m_ossia_process; }
74 std::shared_ptr<ossia::graph_node> node;
78 const ossia::node_ptr& old_node,
const ossia::node_ptr& new_node,
80 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, nodeChanged, old_node, new_node, commands)
83 std::shared_ptr<ossia::time_process> m_ossia_process;
86 template <
typename Process_T,
typename OSSIA_Process_T>
93 OSSIA_Process_T& OSSIAProcess()
const
95 return static_cast<OSSIA_Process_T&
>(ProcessComponent::OSSIAProcess());
101 Process::ProcessModel, Execution::Context, Execution::ProcessComponentFactory>
106 virtual std::shared_ptr<ProcessComponent>
110 template <
typename ProcessComponent_T>
111 #if __cpp_lib_concepts >= 202002L
112 requires std::constructible_from<
118 ProcessComponent_T, ProcessComponentFactory>
121 using model_type =
typename ProcessComponent_T::model_type;
122 std::shared_ptr<ProcessComponent> make(
124 QObject* parent)
const final override
128 #if defined(SCORE_DEBUG)
130 auto comp = std::shared_ptr<ProcessComponent_T>(
133 auto comp = std::make_shared<ProcessComponent_T>(
134 static_cast<model_type&
>(proc), ctx, parent);
139 catch(
const std::runtime_error& e)
141 qDebug() <<
"Error during plug-in creation: " << e.what();
153 Process::ProcessModel, Execution::Context, Execution::ProcessComponentFactory>
160 W_REGISTER_ARGTYPE(ossia::node_ptr)
161 Q_DECLARE_METATYPE(std::shared_ptr<Execution::ProcessComponent>)
162 W_REGISTER_ARGTYPE(std::shared_ptr<Execution::ProcessComponent>)
163 W_REGISTER_ARGTYPE(
const std::shared_ptr<Execution::ProcessComponent>&)
Definition: Process/Execution/ProcessComponent.hpp:37
Definition: Process/Execution/ProcessComponent.hpp:119
Definition: Process/Execution/ProcessComponent.hpp:102
Definition: Process/Execution/ProcessComponent.hpp:154
Definition: Process/Execution/ProcessComponent.hpp:48
Definition: Process/ProcessComponent.hpp:34
Definition: Process/ProcessComponent.hpp:10
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: ComponentFactory.hpp:29
Definition: ModelFactory.hpp:8
Definition: ComponentFactory.hpp:48
Components used for the execution of a score.
Definition: ProcessComponent.cpp:12
Definition: ExecutionContext.hpp:76
Definition: Process/Execution/ProcessComponent.hpp:89
Definition: ExecutionTransaction.hpp:18