Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
ParamAgentBuilder< POL, DAT, SPEC > Class Template Reference

#include "steam/engine/node-builder.hpp"

Description

template<class POL, class DAT, class SPEC>
class steam::engine::ParamAgentBuilder< POL, DAT, SPEC >

Nested sub-Builder analogous to PortBuilder, but for building a »Param Agent Node«.

This will compute additional parameters and make them temporarily accessible through the TurnoutSystem of the invocation, but only while delegating recursively to another computation node, which can then draw upon these additional parameter values.

Template Parameters
SPECa ParamBuildSpec, which is a sub-builder to define the parameter-functors evaluated on each invocation to retrieve the actual parameter values

Definition at line 619 of file node-builder.hpp.

Public Member Functions

ParamAgentBuilder && delegateLead (uint idx)
 use a lead node designated by ID as delegate to invoke with the extended parameters.
 
ParamAgentBuilder && delegateLead (ProcNode &leadNode)
 use the given node as delegate, but also possibly register it as lead node
 
ParamAgentBuilder && delegateLeadPort (uint idx, uint port)
 use a lead node and specific port as delegate to invoke with extended parameters
 
ParamAgentBuilder && delegateLeadPort (ProcNode &leadNode, uint port)
 use the specific port on the given node as delegate, while possibly also registering it as lead node.
 
ParamAgentBuilder && installPostProcessor (PostProcessor pp)
 Install a post-processing function for the parameters.
 
auto completePort ()
 Terminal: complete the Param-Agent wiring and return to the node level.
 
- Public Member Functions inherited from PortBuilderRoot< POL, DAT >
NodeBuilder< POL, DAT > completePort ()
 
template<typename FUN >
auto invoke (StrView portSpec, FUN fun)
 setup standard wiring to adapt the given processing function.
 
template<class SPEC >
auto computeParam (SPEC &&)
 setup a »ParamAgentNode« to compute additional parameters and then delegate into an existing node invocation.
 

Friends

class PortBuilderRoot< POL, DAT >
 

Private Types

using _Par = PortBuilderRoot< POL, DAT >
 
using BlockBuilder = SPEC::BlockBuilder
 
using PostProcessor = function< void(TurnoutSystem &)>
 

Private Member Functions

 ParamAgentBuilder (_Par &&base, BlockBuilder &&builder)
 

Private Attributes

BlockBuilder blockBuilder_
 
PostProcessor postProcessor_
 
PortdelegatePort_
 
uint defaultPortNr_
 

Additional Inherited Members

- Protected Member Functions inherited from NodeBuilder< POL, DAT >
 NodeBuilder (StrView nodeSymbol, INIT &&...alloInit)
 
 NodeBuilder (NodeBuilder< POL, D0 > &&pred, SizMark< siz >, BUILD &&entryBuilder)
 
NodeBuilder && addLead (ProcNode const &lead)
 
PortBuilderRoot< POL, DAT > preparePort ()
 recursively enter detailed setup of a single processing port
 
auto withAllocator (INIT &&...alloInit)
 cross-builder function to specify usage of a dedicated node allocator
 
Connectivity build ()
 Terminal: complete the ProcNode Connectivity defined thus far.
 
- Protected Attributes inherited from NodeBuilder< POL, DAT >
StrView symbol_
 
LeadRefs leads_
 
DAT patternData_
 

Constructor & Destructor Documentation

◆ ParamAgentBuilder()

template<class POL , class DAT , class SPEC >
ParamAgentBuilder ( _Par &&  base,
BlockBuilder &&  builder 
)
inlineprivate

Definition at line 741 of file node-builder.hpp.

Member Typedef Documentation

◆ _Par

template<class POL , class DAT , class SPEC >
using _Par = PortBuilderRoot<POL,DAT>
private

Definition at line 622 of file node-builder.hpp.

◆ BlockBuilder

template<class POL , class DAT , class SPEC >
using BlockBuilder = SPEC::BlockBuilder
private

Definition at line 624 of file node-builder.hpp.

◆ PostProcessor

template<class POL , class DAT , class SPEC >
using PostProcessor = function<void(TurnoutSystem&)>
private

Definition at line 625 of file node-builder.hpp.

Member Function Documentation

◆ delegateLead() [1/2]

template<class POL , class DAT , class SPEC >
ParamAgentBuilder && delegateLead ( uint  idx)
inline

use a lead node designated by ID as delegate to invoke with the extended parameters.

Note
the port to use on this lead is implicitly defaulted to use the same port-number as the port which is currently about to be built; this is a common pattern, since when a top-level node exposes N different flavours, its predecessors will very likely also be configured to produce the pre-product for these flavours.

Definition at line 640 of file node-builder.hpp.

References ParamAgentBuilder< POL, DAT, SPEC >::defaultPortNr_, and ParamAgentBuilder< POL, DAT, SPEC >::delegateLeadPort().

+ Here is the call graph for this function:

◆ delegateLead() [2/2]

template<class POL , class DAT , class SPEC >
ParamAgentBuilder && delegateLead ( ProcNode leadNode)
inline

use the given node as delegate, but also possibly register it as lead node

Definition at line 647 of file node-builder.hpp.

References ParamAgentBuilder< POL, DAT, SPEC >::defaultPortNr_, and ParamAgentBuilder< POL, DAT, SPEC >::delegateLeadPort().

+ Here is the call graph for this function:

◆ delegateLeadPort() [1/2]

template<class POL , class DAT , class SPEC >
ParamAgentBuilder && delegateLeadPort ( uint  idx,
uint  port 
)
inline

use a lead node and specific port as delegate to invoke with extended parameters

Definition at line 654 of file node-builder.hpp.

References ParamAgentBuilder< POL, DAT, SPEC >::delegatePort_, ProcNode::getPort(), NodeBuilder< POL, DAT >::leads_, and LERR_.

Referenced by ParamAgentBuilder< POL, DAT, SPEC >::delegateLead(), ParamAgentBuilder< POL, DAT, SPEC >::delegateLead(), and ParamAgentBuilder< POL, DAT, SPEC >::delegateLeadPort().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ delegateLeadPort() [2/2]

template<class POL , class DAT , class SPEC >
ParamAgentBuilder && delegateLeadPort ( ProcNode leadNode,
uint  port 
)
inline

use the specific port on the given node as delegate, while possibly also registering it as lead node.

Definition at line 669 of file node-builder.hpp.

References NodeBuilder< POL, DAT >::addLead(), ParamAgentBuilder< POL, DAT, SPEC >::delegateLeadPort(), util::isSameObject(), and NodeBuilder< POL, DAT >::leads_.

+ Here is the call graph for this function:

◆ installPostProcessor()

template<class POL , class DAT , class SPEC >
ParamAgentBuilder && installPostProcessor ( PostProcessor  pp)
inline

Install a post-processing function for the parameters.

This functor will be invoked after the individual parameter values have been created by invoking their respective parameter-functor; furthermore, the parameter data block in current scope has already been linked with the TurnoustSystem, and thus the new parameters are already accessible through this front-end and can be manipulated.

Remarks
the purpose is to enable coordinated adjustments on all parameters together, immediately before delegating to the nested node evaluation with these parameters.

Definition at line 695 of file node-builder.hpp.

References ParamAgentBuilder< POL, DAT, SPEC >::postProcessor_.

◆ completePort()

template<class POL , class DAT , class SPEC >
auto completePort ( )
inline

Terminal: complete the Param-Agent wiring and return to the node level.

Remarks
this prepares a suitable Turnout instance for a port; it will actually built later, together with other ports of this Node.

Definition at line 707 of file node-builder.hpp.

References ParamAgentBuilder< POL, DAT, SPEC >::blockBuilder_, ParamAgentBuilder< POL, DAT, SPEC >::delegatePort_, ProcID::describe(), ProcID::genProcSpec(), ProcAttrib::isProxy, LERR_, ProcAttrib::manifold, PortBuilderRoot< POL, DAT >::NodeBuilder, ParamAgentBuilder< POL, DAT, SPEC >::postProcessor_, Port::procID, and NodeBuilder< POL, DAT >::symbol_.

+ Here is the call graph for this function:

Member Data Documentation

◆ blockBuilder_

template<class POL , class DAT , class SPEC >
BlockBuilder blockBuilder_
private

Definition at line 627 of file node-builder.hpp.

Referenced by ParamAgentBuilder< POL, DAT, SPEC >::completePort().

◆ postProcessor_

template<class POL , class DAT , class SPEC >
PostProcessor postProcessor_
private

◆ delegatePort_

template<class POL , class DAT , class SPEC >
Port* delegatePort_
private

◆ defaultPortNr_

template<class POL , class DAT , class SPEC >
uint defaultPortNr_
private

Friends And Related Symbol Documentation

◆ PortBuilderRoot< POL, DAT >

template<class POL , class DAT , class SPEC >
friend class PortBuilderRoot< POL, DAT >
friend

Definition at line 741 of file node-builder.hpp.

+ Inheritance diagram for ParamAgentBuilder< POL, DAT, SPEC >:
+ Collaboration diagram for ParamAgentBuilder< POL, DAT, SPEC >:

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