1#ifndef SRC_COMMON_PIPELINE_STAGES_HPP_
2#define SRC_COMMON_PIPELINE_STAGES_HPP_
11using raw_type = std::remove_cv_t<std::remove_reference_t<T>>;
35template<
typename Input,
typename Output>
45 virtual Output
Run(Input input) = 0;
56template<
typename Input,
typename Output>
Action is an interface that wraps a function that does something.
Definition stages.hpp:17
virtual void DoAction()=0
Performs some action.
A FunctionStage is a data structure that wraps a function, and taking in parameter Input and returnin...
Definition stages.hpp:57
Output * product
The pointer to the stored output for this.
Definition stages.hpp:97
FunctionStage()=default
Constructs a new Stage.
void DoAction() override
Executes Run (with a stored input and storing the output)
Definition stages.hpp:74
Input & GetResource()
Returns the stored input of this.
Definition stages.hpp:83
Output *& GetProduct()
Returns the stored output of this.
Definition stages.hpp:91
Input resource
The stored input for this.
Definition stages.hpp:95
virtual ~FunctionStage()=default
Destroys this.
ModifyingStage is a stage that modifies a resource.
Definition stages.hpp:106
T * resource
The pointer to the resource.
Definition stages.hpp:137
virtual ~ModifyingStage()=default
Destroys this.
ModifyingStage()=default
Constructs a new ModifyingStage.
void SetResource(T &resource)
Sets the resource to modify.
Definition stages.hpp:133
void DoAction() override
Executes Run (with void return)
Definition stages.hpp:121
Stage is an interface that wraps an SISO function.
Definition stages.hpp:36
virtual Output Run(Input input)=0
Runs this stage.