My Project
|
#include <pipeline.hpp>
Public Member Functions | |
Pipeline (std::vector< std::reference_wrapper< Action > > &stages) | |
template<typename I , typename O > | |
Pipeline & | AddStage (Stage< I, O > &stage) |
template<typename I > | |
Pipeline & | Complete (Stage< I, Output > &stage) |
Output | Run (const Input &input) override |
![]() | |
Stage ()=default | |
virtual | ~Stage ()=default |
void | DoAction () override |
Input & | GetResource () |
Output *& | GetProduct () |
Additional Inherited Members | |
![]() | |
Input | resource |
The stored input for this. | |
Output * | product |
The pointer to the stored output for this. | |
Pipeline is composite Stage (i.e. A Stage that is made up of many stages). You can add 1 to many stages into a Pipeline so long as the Input to the first stage is the same Input to the Pipeline, and the Output to the last stage is the Output of the Pipeline.
A Pipeline runs by feeding the input to the first stage, taking its output and feeding it to the next stage, and so on until the last stage outputs the output.
|
inlineexplicit |
Constructs a Pipeline
stages | The vector of stages to provide this object |
|
inline |
Adds a stage to this pipeline
stage | The stage to add to the pipeline |
invalid_argument | iff this is the first time this method is called, and I does not match Input OR if the Pipeline is already complete (aka this::Complete was called successfully) |
|
inline |
Adds a stage to the pipeline and marks it as the last stage, preventing further manipulation of the Pipeline
stage | The stage to add |
invalid_argument | iff this is the first time this method is called, and I does not match Input OR if the Pipeline is already complete (aka this::Complete was called successfully) |
|
inlineoverridevirtual |
Executes this Pipeline
input | The input to this Pipeline |
Implements found::Stage< Input, Output >.