Loading...
Searching...
No Matches
Process/ProcessComponent.hpp
1#pragma once
2#include <Process/Process.hpp>
3
4#include <score/model/Component.hpp>
5
6namespace Process
7{
8template <typename ProcessBase_T, typename Component_T>
9class ProcessComponentBase : public Component_T
10{
11public:
12 template <typename... Args>
13 ProcessComponentBase(ProcessBase_T& cst, Args&&... args)
14 : Component_T{std::forward<Args>(args)...}
15 , m_process{cst}
16 {
17 }
18
19 ProcessBase_T& process() const { return m_process; }
20
21private:
22 ProcessBase_T& m_process;
23};
24
25template <typename Component_T>
27
28template <typename System_T>
31
32template <typename ProcessComponentBase_T, typename Process_T>
33class GenericProcessComponent_T : public ProcessComponentBase_T
34{
35public:
36 using model_type = Process_T;
37 using ProcessComponentBase_T::ProcessComponentBase_T;
38
39 Process_T& process() const
40 {
41 return static_cast<Process_T&>(ProcessComponentBase_T::process());
42 }
43};
44}
Definition Process/ProcessComponent.hpp:34
Definition Process/ProcessComponent.hpp:10
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324