Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
_ProcFun< FUN > Struct Template Reference

#include "steam/engine/feed-manifold.hpp"

Description

template<class FUN>
struct steam::engine::anonymous_namespace{feed-manifold.hpp}::_ProcFun< FUN >

Trait template to analyse and adapt to the given processing function.

The detection logic encoded here attempts to figure out the meaning of the function arguments by their arrangement and type. As a base rule, the arguments are expected in the order: Parameters, Input, Output

  • a single argument function can only be a data generator
  • a binary function can either be a processor input -> output, or accept parameters at «slot-0» and provide output at «slot-1»
  • a ternary function is expected to accept Parameters, Input, Output.
    Template Parameters
    FUNa function-like object, expected to accept 1 - 3 arguments, which all may be simple types, tuples or arrays.
    Note
    »Buffers« are always accepted by pointer, which allows to distinguish parameter and data «slots«
    See also
    VariadicHelper_test::rebuild_variadic()

Definition at line 154 of file feed-manifold.hpp.

Classes

struct  _Case
 Detect use-case as indicated by the function signature. More...
 
struct  _Case< SIG, enable_if< is_BinaryFun< SIG > > >
 
struct  _Case< SIG, enable_if< is_TernaryFun< SIG > > >
 
struct  _Case< SIG, enable_if< is_UnaryFun< SIG > > >
 

Public Types

enum  {
  FAN_I = ElmTypes<SigI>::SIZ ,
  FAN_O = ElmTypes<SigO>::SIZ ,
  FAN_P = ElmTypes<SigP>::SIZ ,
  SLOT_I = _Case<Sig>::SLOT_I ,
  SLOT_O = _Case<Sig>::SLOT_O ,
  SLOT_P = 0
}
 
using Sig = _Fun< FUN >::Sig
 
template<size_t i>
using _Arg = lib::meta::Pick< typename _Fun< Sig >::Args, i >::Type
 
template<size_t i, template< class > class COND>
using AllElements = ElmTypes< _Arg< i > >::template AndAll< COND >
 
using SigI = _Arg< _Case< Sig >::SLOT_I >
 
using SigO = _Arg< _Case< Sig >::SLOT_O >
 
using SigP = _Arg< 0 >
 
using ArgI = ElmTypes< SigI >::Seq
 
using ArgO = ElmTypes< SigO >::Seq
 
using ArgP = ElmTypes< SigP >::Seq
 
using ElmsI = ElmTypes< typename ElmTypes< SigI >::template Apply< remove_pointer_t > >
 
using ElmsO = ElmTypes< typename ElmTypes< SigO >::template Apply< remove_pointer_t > >
 

Static Public Attributes

template<size_t i>
static constexpr bool nonEmpty = ElmTypes<_Arg<i>>::SIZ
 
template<size_t i>
static constexpr bool is_BuffSlot = AllElements<i, is_Buffer>()
 
template<size_t i>
static constexpr bool is_ParamSlot = AllElements<i, is_Value>()
 

Static Public Member Functions

static constexpr bool hasInput ()
 
static constexpr bool hasParam ()
 

Class Documentation

◆ steam::engine::anonymous_namespace{feed-manifold.hpp}::_ProcFun::_Case

struct steam::engine::anonymous_namespace{feed-manifold.hpp}::_ProcFun::_Case
+ Collaboration diagram for _ProcFun< FUN >::_Case< SIG, SEL >:

Member Typedef Documentation

◆ Sig

template<class FUN >
using Sig = _Fun<FUN>::Sig

Definition at line 160 of file feed-manifold.hpp.

◆ _Arg

template<class FUN >
template<size_t i>
using _Arg = lib::meta::Pick<typename _Fun<Sig>::Args, i>::Type

Definition at line 163 of file feed-manifold.hpp.

◆ AllElements

template<class FUN >
template<size_t i, template< class > class COND>
using AllElements = ElmTypes<_Arg<i> >::template AndAll<COND>

Definition at line 166 of file feed-manifold.hpp.

◆ SigI

template<class FUN >
using SigI = _Arg<_Case<Sig>::SLOT_I>

Definition at line 205 of file feed-manifold.hpp.

◆ SigO

template<class FUN >
using SigO = _Arg<_Case<Sig>::SLOT_O>

Definition at line 206 of file feed-manifold.hpp.

◆ SigP

template<class FUN >
using SigP = _Arg< 0>

Definition at line 207 of file feed-manifold.hpp.

◆ ArgI

template<class FUN >
using ArgI = ElmTypes<SigI>::Seq

Definition at line 208 of file feed-manifold.hpp.

◆ ArgO

template<class FUN >
using ArgO = ElmTypes<SigO>::Seq

Definition at line 209 of file feed-manifold.hpp.

◆ ArgP

template<class FUN >
using ArgP = ElmTypes<SigP>::Seq

Definition at line 210 of file feed-manifold.hpp.

◆ ElmsI

template<class FUN >
using ElmsI = ElmTypes<typename ElmTypes<SigI>::template Apply<remove_pointer_t> >

Definition at line 213 of file feed-manifold.hpp.

◆ ElmsO

template<class FUN >
using ElmsO = ElmTypes<typename ElmTypes<SigO>::template Apply<remove_pointer_t> >

Definition at line 214 of file feed-manifold.hpp.

Member Enumeration Documentation

◆ anonymous enum

template<class FUN >
anonymous enum
Enumerator
FAN_I 
FAN_O 
FAN_P 
SLOT_I 
SLOT_O 
SLOT_P 

Definition at line 216 of file feed-manifold.hpp.

Member Function Documentation

◆ hasInput()

template<class FUN >
static constexpr bool hasInput ( )
inlinestaticconstexpr

Definition at line 224 of file feed-manifold.hpp.

◆ hasParam()

template<class FUN >
static constexpr bool hasParam ( )
inlinestaticconstexpr

Definition at line 225 of file feed-manifold.hpp.

Member Data Documentation

◆ nonEmpty

template<class FUN >
template<size_t i>
constexpr bool nonEmpty = ElmTypes<_Arg<i>>::SIZ
staticconstexpr

Definition at line 169 of file feed-manifold.hpp.

◆ is_BuffSlot

template<class FUN >
template<size_t i>
constexpr bool is_BuffSlot = AllElements<i, is_Buffer>()
staticconstexpr

Definition at line 171 of file feed-manifold.hpp.

◆ is_ParamSlot

template<class FUN >
template<size_t i>
constexpr bool is_ParamSlot = AllElements<i, is_Value>()
staticconstexpr

Definition at line 173 of file feed-manifold.hpp.

+ Collaboration diagram for _ProcFun< FUN >:

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