|
FOUND
|
SequentialPipeline is composite Stage (i.e. More...
#include <pipelines.hpp>


Public Member Functions | |
| SequentialPipeline ()=default | |
| Constructs an empty SequentialPipeline. | |
| template<typename I , typename O > | |
| SequentialPipeline & | AddStage (FunctionStage< I, O > &stage) |
| Adds a stage to this pipeline. | |
| template<typename I > | |
| SequentialPipeline & | Complete (FunctionStage< I, Output > &stage) |
| Adds a stage to the pipeline and marks it as the last stage, preventing further manipulation of the SequentialPipeline. | |
| Output | Run (const Input &input) override |
| Executes this SequentialPipeline. | |
Public Member Functions inherited from found::Pipeline< Input, Output, N > | |
| void | DoAction () override |
| Runs a Pipeline. | |
Public Member Functions inherited from found::FunctionStage< Input, Output > | |
| 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. | |
Public Member Functions inherited from found::Stage< const raw_type< Input > &, raw_type< Output > > | |
| virtual raw_type< Output > | Run (const raw_type< Input > & input)=0 |
| Runs this stage. | |
Private Attributes | |
| Input * | firstResource = nullptr |
| The pointer to the variable that will store the first input. | |
| void ** | lastProduct = nullptr |
| A temporary variable that always points to the last Stage's product field. | |
Additional Inherited Members | |
Protected Member Functions inherited from found::Pipeline< Input, Output, N > | |
| 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 inherited from found::Pipeline< Input, Output, N > | |
| 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. | |
Protected Attributes inherited from found::FunctionStage< Input, Output > | |
| Input | resource |
| The stored input for this. | |
| Output * | product = nullptr |
| The pointer to the stored output for this. | |
SequentialPipeline is composite Stage (i.e.
A Stage that is made up of many stages). You can add 1 to many stages into a SequentialPipeline so long as the Input to the first stage is the same Input to the SequentialPipeline, and the Output to the last stage is the Output of the SequentialPipeline.
A SequentialPipeline 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.
| Input | The SequentialPipeline's Input |
| Output | The SequentialPipeline's Output |
| N | Number of stages |
|
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 SequentialPipeline 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 SequentialPipeline.
| 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 SequentialPipeline is already complete (aka this::Complete was called successfully) |
|
inlineoverridevirtual |
Executes this SequentialPipeline.
| input | The input to this SequentialPipeline |
Implements found::Pipeline< Input, Output, N >.