gimo v0.1.0
Loading...
Searching...
No Matches
gimo::Pipeline< Steps > Class Template Reference

A composite object representing a sequence of monadic operations. More...

#include <Pipeline.hpp>

Public Member Functions

constexpr Pipeline (std::tuple< Steps... > steps)
 Constructs a pipeline from a tuple of steps.
 
template<nullable Nullable>
constexpr auto apply (Nullable &&opt) &
 Applies nullable input on the pipeline.
 
template<nullable Nullable>
constexpr auto apply (Nullable &&opt) const &
 Applies nullable input on the pipeline.
 
template<nullable Nullable>
constexpr auto apply (Nullable &&opt) &&
 Applies nullable input on the pipeline.
 
template<nullable Nullable>
constexpr auto apply (Nullable &&opt) const &&
 Applies nullable input on the pipeline.
 
template<typename... SuffixSteps>
constexpr auto append (Pipeline< SuffixSteps... > suffix) const &
 Appends another pipeline to the end of this one.
 
template<typename... SuffixSteps>
constexpr auto append (Pipeline< SuffixSteps... > suffix) &&
 Appends another pipeline to the end of this one.
 

Friends

template<typename... Others>
class Pipeline
 
template<typename... SuffixSteps>
constexpr auto operator| (Pipeline const &prefix, Pipeline< SuffixSteps... > suffix)
 Appends the right-hand-side pipeline to the end of the left-hand-side pipeline.
 
template<typename... SuffixSteps>
constexpr auto operator| (Pipeline &&prefix, Pipeline< SuffixSteps... > suffix)
 Appends the right-hand-side pipeline to the end of the left-hand-side pipeline.
 

Related Symbols

(Note that these are not member symbols.)

template<nullable Nullable, pipeline Pipeline>
constexpr auto apply (Nullable &&opt, Pipeline &&steps)
 Applies nullable input on the pipeline.
 

Detailed Description

template<typename... Steps>
class gimo::Pipeline< Steps >

A composite object representing a sequence of monadic operations.

Template Parameters
StepsThe sequence of algorithm types contained in this pipeline.

Pipelines are created by chaining algorithms (like transform or and_then) and are executed by calling apply member-function, or gimo::apply.

Constructor & Destructor Documentation

◆ Pipeline()

template<typename... Steps>
gimo::Pipeline< Steps >::Pipeline ( std::tuple< Steps... > steps)
inlineexplicitnodiscardconstexpr

Constructs a pipeline from a tuple of steps.

Parameters
stepsThe tuple containing the algorithm instances.

Member Function Documentation

◆ append() [1/2]

template<typename... Steps>
template<typename... SuffixSteps>
auto gimo::Pipeline< Steps >::append ( Pipeline< SuffixSteps... > suffix) &&
inlineconstexpr

Appends another pipeline to the end of this one.

Template Parameters
SuffixStepsThe steps of the appended pipeline.
Returns
A new Pipeline containing all steps from both pipelines.
+ Here is the call graph for this function:

◆ append() [2/2]

template<typename... Steps>
template<typename... SuffixSteps>
auto gimo::Pipeline< Steps >::append ( Pipeline< SuffixSteps... > suffix) const &
inlineconstexpr

Appends another pipeline to the end of this one.

Template Parameters
SuffixStepsThe steps of the appended pipeline.
Returns
A new Pipeline containing all steps from both pipelines.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply() [1/4]

template<typename... Steps>
template<nullable Nullable>
auto gimo::Pipeline< Steps >::apply ( Nullable && opt) &
inlineconstexpr

Applies nullable input on the pipeline.

Template Parameters
NullableThe input type.
Parameters
optThe input value to process.
Returns
The result of the pipeline execution.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ apply() [2/4]

template<typename... Steps>
template<nullable Nullable>
auto gimo::Pipeline< Steps >::apply ( Nullable && opt) &&
inlineconstexpr

Applies nullable input on the pipeline.

Template Parameters
NullableThe input type.
Parameters
optThe input value to process.
Returns
The result of the pipeline execution.
+ Here is the call graph for this function:

◆ apply() [3/4]

template<typename... Steps>
template<nullable Nullable>
auto gimo::Pipeline< Steps >::apply ( Nullable && opt) const &
inlineconstexpr

Applies nullable input on the pipeline.

Template Parameters
NullableThe input type.
Parameters
optThe input value to process.
Returns
The result of the pipeline execution.
+ Here is the call graph for this function:

◆ apply() [4/4]

template<typename... Steps>
template<nullable Nullable>
auto gimo::Pipeline< Steps >::apply ( Nullable && opt) const &&
inlineconstexpr

Applies nullable input on the pipeline.

Template Parameters
NullableThe input type.
Parameters
optThe input value to process.
Returns
The result of the pipeline execution.
+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ Pipeline

template<typename... Steps>
template<typename... Others>
friend class Pipeline
friend

◆ apply()

template<nullable Nullable, pipeline Pipeline>
auto apply ( Nullable && opt,
Pipeline< Steps > && steps )
related

Applies nullable input on the pipeline.

Template Parameters
NullableThe input type.
PipelineThe pipeline type.
Parameters
optThe input value to process.
stepsThe pipeline to execute.
Returns
The result of the pipeline execution.
+ Here is the call graph for this function:

◆ operator| [1/2]

template<typename... Steps>
template<typename... SuffixSteps>
auto operator| ( Pipeline< Steps > && prefix,
Pipeline< SuffixSteps... > suffix )
friend

Appends the right-hand-side pipeline to the end of the left-hand-side pipeline.

Template Parameters
SuffixStepsThe steps of the appended pipeline.
Returns
A new Pipeline containing all steps from both pipelines.

◆ operator| [2/2]

template<typename... Steps>
template<typename... SuffixSteps>
auto operator| ( Pipeline< Steps > const & prefix,
Pipeline< SuffixSteps... > suffix )
friend

Appends the right-hand-side pipeline to the end of the left-hand-side pipeline.

Template Parameters
SuffixStepsThe steps of the appended pipeline.
Returns
A new Pipeline containing all steps from both pipelines.

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