score
Home
Classes
Namespaces
Files
Loading...
Searching...
No Matches
Process/ProcessComponent.hpp
1
#pragma once
2
#include <Process/Process.hpp>
3
4
#include <score/model/Component.hpp>
5
6
namespace
Process
7
{
8
template
<
typename
ProcessBase_T,
typename
Component_T>
9
class
ProcessComponentBase
:
public
Component_T
10
{
11
public
:
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
21
private
:
22
ProcessBase_T& m_process;
23
};
24
25
template
<
typename
Component_T>
26
using
ProcessComponent
=
ProcessComponentBase<Process::ProcessModel, Component_T>
;
27
28
template
<
typename
System_T>
29
using
GenericProcessComponent
30
=
Process::ProcessComponent<score::GenericComponent<System_T>
>;
31
32
template
<
typename
ProcessComponentBase_T,
typename
Process_T>
33
class
GenericProcessComponent_T
:
public
ProcessComponentBase_T
34
{
35
public
:
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
}
Process::GenericProcessComponent_T
Definition
Process/ProcessComponent.hpp:34
Process::ProcessComponentBase
Definition
Process/ProcessComponent.hpp:10
Process
Base classes and tools to implement processes and layers.
Definition
JSONVisitor.hpp:1324