FOUND
Loading...
Searching...
No Matches
found::FunctionStage< Input, Output > Class Template Reference

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

#include <stages.hpp>

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

Public Member Functions

 FunctionStage ()=default
 Constructs a new Stage.
 
virtual ~FunctionStage ()=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.
 
- 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.
 

Protected Attributes

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

Detailed Description

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

A FunctionStage 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

Member Function Documentation

◆ DoAction()

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

◆ GetProduct()

template<typename Input , typename Output >
Output *& found::FunctionStage< 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::FunctionStage< Input, Output >::GetResource ( )
inline

Returns the stored input of this.

Returns
The stored input of this

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