![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "steam/engine/feed-manifold.hpp"
Builder-Prototype to create FeedManifold instances.
This »Prototype« becomes part of the Turnout / WeavingPattern and holds processing- and parameter-functor instances as configuration. The Processing-Functor will be copied into the actual FeedManifold instance for each Node invocation.
| FUN | type of the data processing-functor |
| PAM | type of an optional parameter-setup functor (defaults to deactivated) |
The Prototype is typically first built solely from a processing-functor. It can even be constructed as type only, by FeedManifold<FUN>::Prototype. In this form, any parameter handling will be disabled. However, by adding a parameter-functor with the cross-builder-API, a new instance of the prototype is created as a replacement of the old one (note: we move the processing functor). This adds a parameter-functor to the configuration, which will then be invoked whenever a new FeedManifold instance is created; the result of this parameter-functor invocation should be a parameter value, which can be passed into the constructor of FeedManifold, together with a copy of the proc-functor.
Definition at line 548 of file feed-manifold.hpp.
Public Types | |
| enum | { FAN_I = Feed::FAN_I , FAN_O = Feed::FAN_O , FAN_P = Feed::FAN_P } |
| using | Feed = FeedManifold< FUN > |
| using | ElmsI = _Proc::ElmsI |
| using | ElmsO = _Proc::ElmsO |
| using | ElmsP = conditional_t< _Trait::hasParam(), typename _Proc::ArgP, Types<> > |
| using | Param = _Proc::SigP |
| template<template< class > class META> | |
| using | OutTypesApply = ElmsO::template Apply< META > |
| using | ProcFun = FUN |
| using | ParamFun = PAM |
| template<typename PFX > | |
| using | Adapted = FeedPrototype< FUN, PFX > |
| template<typename TRA > | |
| using | DecoratedProcFun = decltype(std::declval< FeedPrototype >().decorateProcParam(std::declval< TRA >())) |
| template<typename TRA > | |
| using | Decorated = FeedPrototype< DecoratedProcFun< TRA >, PAM > |
Static Public Member Functions | |
| static constexpr bool | hasParam () |
| static constexpr bool | hasParamFun () |
| static constexpr bool | canActivate () |
| template<typename PFX > | |
| static constexpr bool | isSuitableParamFun () |
| is the given functor suitable as parameter functor for this Feed? | |
| template<typename PFX > | |
| static constexpr bool | isSuitableParamAdaptor () |
| is the given functor suitable to adapt the parameter argument of the processing-functor to accept different input values? | |
Public Member Functions | |
| FeedPrototype (FUN &&proc) | |
| setup with processing-functor only | |
| FeedPrototype (FUN &&proc, PAM &&par) | |
| bool | isActivated () const |
| Feed | buildFeed (TurnoutSystem &turnoutSys) |
| create suitable Feed(Manifold) for processing a Node invocation | |
| template<typename PFX > | |
| auto | moveAdaptedParam (PFX otherParamFun=PFX{}) |
| Cross-Builder to add configuration with a given parameter-functor. | |
| enable_if< __and_< is_copy_constructible< FUN >, is_copy_constructible< PAM > >, FeedPrototype > | clone () const |
| build a clone-copy of this prototype, holding the same functors | |
| template<typename PFX = PAM, typename = enable_if<std::is_assignable<PAM,PFX>>> | |
| FeedPrototype && | assignParamFun (PFX &¶mFunDef=PAM{}) |
| Change the current parameter-functor setup by assigning some value. | |
| template<typename TRA > | |
| auto | decorateProcParam (TRA paramTransformer) |
| template<typename TRA > | |
| auto | moveTransformedParam (TRA paramTransformer) |
| Adapt parameter handling of the processing-function by passing parameters through an adapter functor before feeding them into the processing-function. | |
Private Types | |
| using | _Proc = _ProcFun< FUN > |
| using | _Trait = _ParamFun< FUN > |
Private Attributes | |
| FUN | procFun_ |
| PAM | paramFun_ |
Additional Inherited Members | |
Private Member Functions inherited from MoveOnly | |
| ~MoveOnly ()=default | |
| MoveOnly ()=default | |
| MoveOnly (MoveOnly &&)=default | |
| MoveOnly (MoveOnly const &)=delete | |
| MoveOnly & | operator= (MoveOnly &&)=delete |
| MoveOnly & | operator= (MoveOnly const &)=delete |
|
inline |
setup with processing-functor only
Definition at line 573 of file feed-manifold.hpp.
|
inline |
Definition at line 578 of file feed-manifold.hpp.
|
private |
Definition at line 551 of file feed-manifold.hpp.
|
private |
Definition at line 552 of file feed-manifold.hpp.
| using Feed = FeedManifold<FUN> |
Definition at line 558 of file feed-manifold.hpp.
| using ElmsI = _Proc::ElmsI |
Definition at line 563 of file feed-manifold.hpp.
| using ElmsO = _Proc::ElmsO |
Definition at line 564 of file feed-manifold.hpp.
| using ElmsP = conditional_t<_Trait::hasParam(), typename _Proc::ArgP, Types<> > |
Definition at line 565 of file feed-manifold.hpp.
| using Param = _Proc::SigP |
Definition at line 566 of file feed-manifold.hpp.
| using OutTypesApply = ElmsO::template Apply<META> |
Definition at line 569 of file feed-manifold.hpp.
| using ProcFun = FUN |
Definition at line 609 of file feed-manifold.hpp.
| using ParamFun = PAM |
Definition at line 610 of file feed-manifold.hpp.
Definition at line 613 of file feed-manifold.hpp.
| using DecoratedProcFun = decltype(std::declval<FeedPrototype>().decorateProcParam (std::declval<TRA>())) |
Definition at line 708 of file feed-manifold.hpp.
| using Decorated = FeedPrototype<DecoratedProcFun<TRA>,PAM> |
Definition at line 711 of file feed-manifold.hpp.
| anonymous enum |
| Enumerator | |
|---|---|
| FAN_I | |
| FAN_O | |
| FAN_P | |
Definition at line 559 of file feed-manifold.hpp.
|
inlinestaticconstexpr |
Definition at line 584 of file feed-manifold.hpp.
Referenced by FeedPrototype< FUN, PAM >::isSuitableParamAdaptor(), and FeedPrototype< FUN, PAM >::isSuitableParamFun().
Here is the caller graph for this function:
|
inlinestaticconstexpr |
Definition at line 585 of file feed-manifold.hpp.
Referenced by FeedPrototype< FUN, PAM >::buildFeed().
Here is the caller graph for this function:
|
inlinestaticconstexpr |
Definition at line 586 of file feed-manifold.hpp.
|
inline |
Definition at line 589 of file feed-manifold.hpp.
References FeedPrototype< FUN, PAM >::paramFun_.
Referenced by FeedPrototype< FUN, PAM >::buildFeed().
Here is the caller graph for this function:
|
inline |
create suitable Feed(Manifold) for processing a Node invocation
Definition at line 597 of file feed-manifold.hpp.
References FeedPrototype< FUN, PAM >::hasParamFun(), FeedPrototype< FUN, PAM >::isActivated(), FeedPrototype< FUN, PAM >::paramFun_, and FeedPrototype< FUN, PAM >::procFun_.
Here is the call graph for this function:
|
inlinestaticconstexpr |
is the given functor suitable as parameter functor for this Feed?
Definition at line 617 of file feed-manifold.hpp.
References FeedPrototype< FUN, PAM >::hasParam().
Here is the call graph for this function:
|
inlinestaticconstexpr |
is the given functor suitable to adapt the parameter argument of the processing-functor to accept different input values?
Definition at line 624 of file feed-manifold.hpp.
References FeedPrototype< FUN, PAM >::hasParam().
Here is the call graph for this function:
|
inline |
Cross-Builder to add configuration with a given parameter-functor.
Definition at line 640 of file feed-manifold.hpp.
|
inline |
build a clone-copy of this prototype, holding the same functors
Definition at line 652 of file feed-manifold.hpp.
References FeedPrototype< FUN, PAM >::paramFun_, and FeedPrototype< FUN, PAM >::procFun_.
|
inline |
Change the current parameter-functor setup by assigning some value.
| paramFunDef | something that is assignable to PAM |
std::function, then the param-functor can not only be reconfigured, but also disabled. Definition at line 666 of file feed-manifold.hpp.
|
inline |
build an adapted version of the processing-functor, thereby attaching the parameter-transformer.
Definition at line 677 of file feed-manifold.hpp.
References FeedPrototype< FUN, PAM >::procFun_.
Referenced by FeedPrototype< FUN, PAM >::moveTransformedParam().
Here is the caller graph for this function:
|
inline |
Adapt parameter handling of the processing-function by passing parameters through an adapter functor before feeding them into the processing-function.
Definition at line 721 of file feed-manifold.hpp.
References FeedPrototype< FUN, PAM >::decorateProcParam(), and FeedPrototype< FUN, PAM >::paramFun_.
Here is the call graph for this function:
|
private |
Definition at line 554 of file feed-manifold.hpp.
Referenced by FeedPrototype< FUN, PAM >::buildFeed(), FeedPrototype< FUN, PAM >::clone(), and FeedPrototype< FUN, PAM >::decorateProcParam().
|
private |
Definition at line 555 of file feed-manifold.hpp.
Referenced by FeedPrototype< FUN, PAM >::buildFeed(), FeedPrototype< FUN, PAM >::clone(), FeedPrototype< FUN, PAM >::isActivated(), and FeedPrototype< FUN, PAM >::moveTransformedParam().
Inheritance diagram for FeedPrototype< FUN, PAM >:
Collaboration diagram for FeedPrototype< FUN, PAM >: