FOUND
|
Pipeline is composite Stage (i.e. More...
#include <pipeline.hpp>
Public Member Functions | |
Pipeline (std::vector< std::reference_wrapper< Action > > &stages) | |
Constructs a Pipeline. | |
Pipeline () | |
Constructs an empty Pipeline. | |
template<typename I , typename O > | |
Pipeline & | AddStage (Stage< I, O > &stage) |
Adds a stage to this pipeline. | |
template<typename I > | |
Pipeline & | Complete (Stage< I, Output > &stage) |
Adds a stage to the pipeline and marks it as the last stage, preventing further manipulation of the Pipeline. | |
Output | Run (const Input &input) override |
Executes this Pipeline. | |
![]() | |
Stage ()=default | |
Constructs a new Stage. | |
virtual | ~Stage ()=default |
Destroys this. | |
void | DoAction () override |
Executes Run (with a stored input and storing the output) | |
Input & | GetResource () |
Returns the stored input of this. | |
Output *& | GetProduct () |
Returns the stored output of this. | |
Private Attributes | |
std::vector< std::reference_wrapper< Action > > | stages |
The stages of this. | |
Input * | firstResource |
The pointer to the variable that will store the first input. | |
Output | finalProduct |
The final product (output) | |
void ** | lastProduct = nullptr |
A temporary variable that always points to the last Stage's product field. | |
bool | ready |
An indicator for if this Pipeline is ready. | |
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 |
Constructs an empty Pipeline.
|
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 >.
|
private |
The final product (output)
|
private |
The pointer to the variable that will store the first input.
|
private |
A temporary variable that always points to the last Stage's product field.
|
private |
An indicator for if this Pipeline is ready.
|
private |
The stages of this.