FOUND
|
A Pipeline<Input, Output, N> is an abstract Pipeline that takes an Input, outputs an Output, with N stages. More...
#include <pipelines.hpp>
Public Member Functions | |
void | DoAction () override |
Runs a Pipeline. | |
virtual Output | Run (const Input &input)=0 |
Runs this Pipeline. | |
![]() | |
FunctionStage ()=default | |
Constructs a new Stage. | |
virtual | ~FunctionStage ()=default |
Destroys this. | |
Input & | GetResource () |
Returns the stored input of this. | |
Output *& | GetProduct () |
Returns the stored output of this. | |
![]() | |
virtual raw_type< Output > | Run (const raw_type< Input > & input)=0 |
Runs this stage. | |
Protected Member Functions | |
void | AddStageHelper (Action &stage) |
Adds a stage to this pipeline. | |
void | CompleteHelper (Action &stage) |
Completes a pipeline with a stage. | |
void | DoActionHelper () |
Runs the entire pipeline. | |
Protected Attributes | |
Action * | stages [N] |
The stages of this. | |
size_t | size = 0 |
The number of stages. | |
bool | ready = false |
Whether we're complete. | |
std::optional< Output > | finalProduct |
The final product. This is only sometimes used. | |
![]() | |
Input | resource |
The stored input for this. | |
Output * | product = nullptr |
The pointer to the stored output for this. | |
A Pipeline<Input, Output, N> is an abstract Pipeline that takes an Input, outputs an Output, with N stages.
Input | The input type |
Output | The output type |
N | The number of stages it uses |
|
inlineprotected |
Adds a stage to this pipeline.
stage | The stage to add to the pipeline |
std::invalid_argument | iff this is already completed |
|
inlineprotected |
Completes a pipeline with a stage.
stage | The stage to add |
std::invalid_argument | iff this is already completed |
|
inlineoverridevirtual |
Runs a Pipeline.
Reimplemented from found::FunctionStage< Input, Output >.
|
inlineprotected |
Runs the entire pipeline.
|
pure virtual |
Runs this Pipeline.
input | The input to the Pipeline |
Implemented in found::SequentialPipeline< Input, Output, N >.