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>>;
34template<
typename Input,
typename Output>
44 virtual Output
Run(Input input) = 0;
55template<
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:56
Output * product
The pointer to the stored output for this.
Definition stages.hpp:96
FunctionStage()=default
Constructs a new Stage.
void DoAction() override
Executes Run (with a stored input and storing the output)
Definition stages.hpp:73
Input & GetResource()
Returns the stored input of this.
Definition stages.hpp:82
Output *& GetProduct()
Returns the stored output of this.
Definition stages.hpp:90
Input resource
The stored input for this.
Definition stages.hpp:94
virtual ~FunctionStage()=default
Destroys this.
ModifyingStage is a stage that modifies a resource.
Definition stages.hpp:105
T * resource
The pointer to the resource.
Definition stages.hpp:136
virtual ~ModifyingStage()=default
Destroys this.
ModifyingStage()=default
Constructs a new ModifyingStage.
void SetResource(T &resource)
Sets the resource to modify.
Definition stages.hpp:132
void DoAction() override
Executes Run (with void return)
Definition stages.hpp:120
Stage is an interface that wraps an SISO function.
Definition stages.hpp:35
virtual Output Run(Input input)=0
Runs this stage.