FOUND
Loading...
Searching...
No Matches
found::Stage< Input, Output > Class Template Referenceabstract

A Stage is a data structure that wraps a function, and taking in parameter Input and returning Output. More...

#include <pipeline.hpp>

Inheritance diagram for found::Stage< Input, Output >:
Collaboration diagram for found::Stage< Input, Output >:

Public Member Functions

 Stage ()=default
 Constructs a new Stage.
 
virtual ~Stage ()=default
 Destroys this.
 
virtual Output Run (const Input &input)=0
 Runs this stage.
 
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.
 

Protected Attributes

Input resource
 The stored input for this.
 
Output * product
 The pointer to the stored output for this.
 

Detailed Description

template<typename Input, typename Output>
class found::Stage< Input, Output >

A Stage is a data structure that wraps a function, and taking in parameter Input and returning Output.

Parameters
InputThe parameter to accept to the Run function
OutputThe parameter to return from the Run function

Constructor & Destructor Documentation

◆ Stage()

template<typename Input , typename Output >
found::Stage< Input, Output >::Stage ( )
default

Constructs a new Stage.

◆ ~Stage()

template<typename Input , typename Output >
virtual found::Stage< Input, Output >::~Stage ( )
virtualdefault

Destroys this.

Member Function Documentation

◆ DoAction()

template<typename Input , typename Output >
void found::Stage< Input, Output >::DoAction ( )
inlineoverridevirtual

Executes Run (with a stored input and storing the output)

Implements found::Action.

◆ GetProduct()

template<typename Input , typename Output >
Output *& found::Stage< Input, Output >::GetProduct ( )
inline

Returns the stored output of this.

Returns
The pointer to the stored output of this

◆ GetResource()

template<typename Input , typename Output >
Input & found::Stage< Input, Output >::GetResource ( )
inline

Returns the stored input of this.

Returns
The stored input of this

◆ Run()

Member Data Documentation

◆ product

template<typename Input , typename Output >
Output* found::Stage< Input, Output >::product
protected

The pointer to the stored output for this.

◆ resource

template<typename Input , typename Output >
Input found::Stage< Input, Output >::resource
protected

The stored input for this.


The documentation for this class was generated from the following file: