GrPPI  0.3.1
Generic and Reusable Parallel Pattern Interface
Public Types | Public Member Functions | List of all members
grppi::pipeline_t< Transformers > Class Template Reference

Representation of pipeline pattern. Represents a pipeline with multiple chained transformers. More...

#include <pipeline_pattern.h>

Public Types

using transformers_type = std::tuple< Transformers... >
 

Public Member Functions

 pipeline_t (Transformers &&...others) noexcept
 Constructs a pipeline with several transformers. More...
 
template<std::size_t index, typename T , typename std::enable_if< index==(sizeof...(Transformers)-1), int >::type = 0>
auto invoke_all (T item) const
 
template<std::size_t index, typename T , typename std::enable_if< index!=(sizeof...(Transformers)-1), int >::type = 0>
auto invoke_all (T item) const
 
template<typename T >
auto operator() (T item) const
 
template<std::size_t I, typename T >
auto invoke (T &&item) const
 Invokes a trasnformer from the pipeline. More...
 
template<std::size_t I>
auto stage () const noexcept
 Gets a transformer from the pipeline. More...
 
auto transformers () const noexcept
 

Detailed Description

template<typename... Transformers>
class grppi::pipeline_t< Transformers >

Representation of pipeline pattern. Represents a pipeline with multiple chained transformers.

Template Parameters
TransformerCallable type for the first transformer.
OtherTransformersCallable types for the rest of transformers.

Member Typedef Documentation

template<typename... Transformers>
using grppi::pipeline_t< Transformers >::transformers_type = std::tuple<Transformers...>

Constructor & Destructor Documentation

template<typename... Transformers>
grppi::pipeline_t< Transformers >::pipeline_t ( Transformers &&...  others)
inlinenoexcept

Constructs a pipeline with several transformers.

Parameters
tTransformer for the first stage of the pipeline.
othersRest of transformers for the other stages of the pipeline.

Member Function Documentation

template<typename... Transformers>
template<std::size_t I, typename T >
auto grppi::pipeline_t< Transformers >::invoke ( T &&  item) const
inline

Invokes a trasnformer from the pipeline.

Template Parameters
I
template<typename... Transformers>
template<std::size_t index, typename T , typename std::enable_if< index==(sizeof...(Transformers)-1), int >::type = 0>
auto grppi::pipeline_t< Transformers >::invoke_all ( item) const
inline
template<typename... Transformers>
template<std::size_t index, typename T , typename std::enable_if< index!=(sizeof...(Transformers)-1), int >::type = 0>
auto grppi::pipeline_t< Transformers >::invoke_all ( item) const
inline
template<typename... Transformers>
template<typename T >
auto grppi::pipeline_t< Transformers >::operator() ( item) const
inline
template<typename... Transformers>
template<std::size_t I>
auto grppi::pipeline_t< Transformers >::stage ( ) const
inlinenoexcept

Gets a transformer from the pipeline.

Template Parameters
Iindex into the pipeline.
Returns
The selected transformer object.
template<typename... Transformers>
auto grppi::pipeline_t< Transformers >::transformers ( ) const
inlinenoexcept

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