Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
ParamWeavingPattern< SPEC > Struct Template Reference

#include "steam/engine/param-weaving-pattern.hpp"

Description

template<class SPEC>
struct steam::engine::ParamWeavingPattern< SPEC >

Implementation for a Weaving Pattern to conduct extended parameter evaluation.

A tuple of parameter-functors is embedded and will be invoked on each activation, to generate a tuple of parameter-values, which are placed into the local stack frame and then made accessible through the TurnoutSystem. Then the delegatePort_ is invoked recursively; the additional parameter values are thus usable from within all nodes contained therein, during this recursive evaluation.

Definition at line 284 of file param-weaving-pattern.hpp.

Classes

struct  Feed
 Storage data frame placed on the call stack. More...
 

Public Types

using Functors = SPEC::Functors
 
using DataBlock = SPEC::ChainCons::NewFrame
 
using BlockBuilder = SPEC::BlockBuilder
 
using PostProcessor = function< void(TurnoutSystem &)>
 

Public Attributes

BlockBuilder blockBuilder_
 
PostProcessor postProcess_
 
PortdelegatePort_
 

Public Member Functions

 ParamWeavingPattern (BlockBuilder builder, PostProcessor postProc, Port &delegate)
 forwarding-ctor to used from within Turnout, to provide actual setup.
 
Feed mount (TurnoutSystem &)
 Preparation: create a Feed data frame to use as local scope.
 
void pull (Feed &feed, TurnoutSystem &turnoutSys)
 Invoke the parameter-functors to create the basic parameter data.
 
void shed (Feed &feed, TurnoutSystem &turnoutSys, OptionalBuff outBuff)
 Link the param-data-block into the current TurnoutSystem, possibly post-process the param data.
 
void weft (Feed &feed, TurnoutSystem &turnoutSys)
 recursively invoke the delegate port, while the generated parameter-data is indirectly reachable through the TurnoutSystem
 
BuffHandle fix (Feed &feed, TurnoutSystem &turnoutSys)
 clean-up: detach the parameter-data-block.
 

Friends

auto _accessInternal (ParamWeavingPattern &patt)
 

Additional Inherited Members

- Protected Member Functions inherited from MoveOnly
 ~MoveOnly ()=default
 
 MoveOnly ()=default
 
 MoveOnly (MoveOnly &&)=default
 
 MoveOnly (MoveOnly const &)=delete
 
MoveOnlyoperator= (MoveOnly &&)=delete
 
MoveOnlyoperator= (MoveOnly const &)=delete
 

Constructor & Destructor Documentation

◆ ParamWeavingPattern()

template<class SPEC >
ParamWeavingPattern ( BlockBuilder  builder,
PostProcessor  postProc,
Port delegate 
)
inline

forwarding-ctor to used from within Turnout, to provide actual setup.

Definition at line 314 of file param-weaving-pattern.hpp.

Member Typedef Documentation

◆ Functors

template<class SPEC >
using Functors = SPEC::Functors

Definition at line 287 of file param-weaving-pattern.hpp.

◆ DataBlock

template<class SPEC >
using DataBlock = SPEC::ChainCons::NewFrame

Definition at line 288 of file param-weaving-pattern.hpp.

◆ BlockBuilder

template<class SPEC >
using BlockBuilder = SPEC::BlockBuilder

Definition at line 289 of file param-weaving-pattern.hpp.

◆ PostProcessor

template<class SPEC >
using PostProcessor = function<void(TurnoutSystem&)>

Definition at line 290 of file param-weaving-pattern.hpp.

Member Function Documentation

◆ mount()

template<class SPEC >
Feed mount ( TurnoutSystem )
inline

Preparation: create a Feed data frame to use as local scope.

Definition at line 323 of file param-weaving-pattern.hpp.

◆ pull()

template<class SPEC >
void pull ( Feed feed,
TurnoutSystem turnoutSys 
)
inline

Invoke the parameter-functors to create the basic parameter data.

Definition at line 330 of file param-weaving-pattern.hpp.

References ParamWeavingPattern< SPEC >::blockBuilder_, and ParamWeavingPattern< SPEC >::Feed::emplaceParamDataBlock().

+ Here is the call graph for this function:

◆ shed()

template<class SPEC >
void shed ( Feed feed,
TurnoutSystem turnoutSys,
OptionalBuff  outBuff 
)
inline

Link the param-data-block into the current TurnoutSystem, possibly post-process the param data.

From this point on, Nodes within the nested scope can draw from this data.

Definition at line 340 of file param-weaving-pattern.hpp.

References TurnoutSystem::attachChainBlock(), ParamWeavingPattern< SPEC >::Feed::block(), ParamWeavingPattern< SPEC >::Feed::outBuff, and ParamWeavingPattern< SPEC >::postProcess_.

+ Here is the call graph for this function:

◆ weft()

template<class SPEC >
void weft ( Feed feed,
TurnoutSystem turnoutSys 
)
inline

recursively invoke the delegate port, while the generated parameter-data is indirectly reachable through the TurnoutSystem

Definition at line 352 of file param-weaving-pattern.hpp.

References ParamWeavingPattern< SPEC >::delegatePort_, ParamWeavingPattern< SPEC >::Feed::outBuff, and Port::weave().

+ Here is the call graph for this function:

◆ fix()

template<class SPEC >
BuffHandle fix ( Feed feed,
TurnoutSystem turnoutSys 
)
inline

clean-up: detach the parameter-data-block.

Returns
the output buffer produced by the recursive delegate call.

Definition at line 362 of file param-weaving-pattern.hpp.

References ParamWeavingPattern< SPEC >::Feed::block(), TurnoutSystem::detachChainBlock(), and ParamWeavingPattern< SPEC >::Feed::outBuff.

+ Here is the call graph for this function:

Member Data Documentation

◆ blockBuilder_

template<class SPEC >
BlockBuilder blockBuilder_

Definition at line 292 of file param-weaving-pattern.hpp.

Referenced by ParamWeavingPattern< SPEC >::pull().

◆ postProcess_

template<class SPEC >
PostProcessor postProcess_

Definition at line 293 of file param-weaving-pattern.hpp.

Referenced by ParamWeavingPattern< SPEC >::shed().

◆ delegatePort_

template<class SPEC >
Port& delegatePort_

Definition at line 294 of file param-weaving-pattern.hpp.

Referenced by ParamWeavingPattern< SPEC >::weft().

Friends And Related Symbol Documentation

◆ _accessInternal

template<class SPEC >
auto _accessInternal ( ParamWeavingPattern< SPEC > &  patt)
friend

expose data not dependent on the template params

Definition at line 371 of file param-weaving-pattern.hpp.

+ Inheritance diagram for ParamWeavingPattern< SPEC >:
+ Collaboration diagram for ParamWeavingPattern< SPEC >:

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