117#ifndef ENGINE_NODE_BUILDER_H
118#define ENGINE_NODE_BUILDER_H
150 template<
class I,
class E=I>
163 template<
class POL,
class I,
class E=I>
168 template<
class POL,
class DAT>
171 template<
class POL,
class DAT>
188 template<
class POL,
class DAT = PatternDataAnchor>
201 template<
typename...INIT>
204 ,
leads_{forward<INIT> (alloInit)...}
207 template<
class BUILD, u
int siz,
class D0>
214 template<
class P,
class D0>
221 leads_.append (ref(lead));
245 template<
template<
typename>
class ALO =std::void_t,
typename...INIT>
269 template<
class POL,
class D0, u
int siz,
class BUILD>
279 template<
class POL,
class DAT>
287 static_assert(not
sizeof(POL),
288 "can not build a port without specifying a processing function");
293 template<
typename FUN>
317 template<
class POL,
class DAT>
334 template<
class POL,
class DAT,
class WAB>
349 template<
class ILA,
typename...ARGS>
353 UNIMPLEMENTED (
"define builder for all buffers to use");
391 throw err::Logic{
_Fmt{
"Builder refers to lead-node #%d, yet only %d are currently defined."}
420 this->defaultPort_ = defaultPort;
435 using AdaptedWeavingBuilder = WAB::template Adapted<PFX>;
438 return AdaptedPortBuilder{move(*
this)
456 template<
typename PAR>
466 template<
typename PAR,
typename...PARS>
472 return std::make_tuple (v1,vs...);
478 template<
typename GET>
485 return turnoutSys.
get(accessor);
489 template<
typename ADA>
493 using DecoratedPrototype = WAB::template Decorated<ADA>;
496 return AdaptedPortBuilder{move(*
this)
504 template<
typename PAR,
typename...PARS>
509 WAB::ParamClosure::template closeFront (forward<PAR> (v1)
510 ,forward<PARS>(vs)...));
515 template<
typename PAR,
typename...PARS>
520 WAB::ParamClosure::template closeBack (forward<PAR> (v1)
521 ,forward<PARS>(vs)...));
527 template<
size_t idx,
typename PAR>
532 WAB::ParamClosure::template close<idx> (forward<PAR> (val)));
553 template<
typename FUN>
565 :
_Par{move(prevBuilder)}
570 template<
class PX,
class DX,
class WX>
596 template<
class POL,
class DAT>
597 template<
typename FUN>
618 template<
class POL,
class DAT,
class SPEC>
657 throw err::Logic{
_Fmt{
"Builder refers to lead-node #%d, yet only %d are currently defined."}
710 throw err::Logic{
"Building a ParamAgentNode requires a delegate node "
711 "to perform within the scope with extended parameters"
712 ,
LERR_(BOTTOM_VALUE)};
723 ,
SizMark<
sizeof(TurnoutWeaving)>{}
730 (PortDataBuilder& portData)
mutable ->
void
732 portData.template emplace<TurnoutWeaving> (procID
782 template<
class POL,
class DAT>
819 UNIMPLEMENTED (
"enumerate all source feeds required");
827 UNIMPLEMENTED (
"recursively define a predecessor feed");
837 UNIMPLEMENTED(
"Level-3 build-walk");
851 UNIMPLEMENTED (
"recursively enter definition of processor node to produce this feed link");
865 UNIMPLEMENTED(
"start a connectivity definition at Level-3");
Subscript-index based access to a container, packaged as iterator.
Builder to create and populate a lib::Several<I>.
Interface: Description of the input and output ports, processing function and predecessor nodes for a...
void from(void *procAsset)
Top-level builder to create a single Render Node.
PortBuilderRoot< POL, DAT > preparePort()
recursively enter detailed setup of a single processing port
DataBuilder< POL, Port > PortData
NodeBuilder && addLead(ProcNode const &lead)
DataBuilder< POL, ProcNodeRef > LeadRefs
NodeBuilder(NodeBuilder< POL, D0 > &&pred, SizMark< siz >, BUILD &&entryBuilder)
NodeBuilder(StrView nodeSymbol, INIT &&...alloInit)
Connectivity build()
Terminal: complete the ProcNode Connectivity defined thus far.
auto withAllocator(INIT &&...alloInit)
cross-builder function to specify usage of a dedicated node allocator
Nested sub-Builder analogous to PortBuilder, but for building a »Param Agent Node«.
ParamAgentBuilder && delegateLeadPort(uint idx, uint port)
use a lead node and specific port as delegate to invoke with extended parameters
BlockBuilder blockBuilder_
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.
ParamAgentBuilder && delegateLead(uint idx)
use a lead node designated by ID as delegate to invoke with the 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.
SPEC::BlockBuilder BlockBuilder
function< void(TurnoutSystem &)> PostProcessor
ParamAgentBuilder(_Par &&base, BlockBuilder &&builder)
ParamAgentBuilder && delegateLead(ProcNode &leadNode)
use the given node as delegate, but also possibly register it as lead node
PostProcessor postProcessor_
Nested DSL builder scope to define a single Port for the enclosing Node.
NodeBuilder< POL, DAT > completePort()
PortBuilderRoot(NodeBuilder< POL, DAT > &&anchor)
friend PortBuilderRoot NodeBuilder()
auto computeParam(SPEC &&)
setup a »ParamAgentNode« to compute additional parameters and then delegate into an existing node inv...
auto invoke(StrView portSpec, FUN fun)
setup standard wiring to adapt the given processing function.
Nested DSL-Builder context to define a regular media processing Port.
auto attachParamFun(PFX paramFunctor)
Embed the explicitly given parameter-functor into the FeedPrototype, so that it will be called on eac...
PortBuilder(PortBuilder< POL, DAT, WABO > &&prevBuilder, WAB &&adaptedWeavingBuilder)
cross-builder to adapt embedded WeavingBuilder type
auto setParam(PAR v1, PARS ...vs)
auto completePort()
Terminal: complete the Port wiring and return to the node level.
PortBuilder && connectLead(ProcNode &leadNode)
connect the next input slot to either existing or new lead-node"
auto closeParamFront(PAR v1, PARS ...vs)
immediately close (≙ fix) some values in a parameter tuple, starting from left, while leaving the rem...
auto closeParamBack(PAR v1, PARS ...vs)
immediately close the rightmost parameter positions, applying the given values in forward order.
auto retrieveParam(GET &&getter)
retrieve the parameter(s) at invocation time through a getter functor, which is typically constructed...
auto closeParam(PAR val)
immediately close a single parameter at designated position
auto attachAutomation(AUTO &&aFun)
control parameter(s) by an automation function, based on nominal timeline time
PortBuilder && useLeadPort(uint defaultPort)
use given port-index as default for all following connections
auto adaptParam(ADA &¶mAdaptor)
PortBuilder && connectLeadPort(uint idx, uint port)
connect next input to lead-node, using a specific port-number
PortBuilder && connectLeadPort(ProcNode &leadNode, uint port)
connect next input to existing or new lead-node, with given port-number
PortBuilder && asResultSlot(uint r)
define the output slot number to use as result
PortBuilder && createBuffers(ARGS &&...args)
PortBuilder(_Par &&base, FUN &&fun, StrView portSpec)
auto setParam(PAR paramVal)
embed a fixed value to use for the parameter(s)
PortBuilder && connectLead(uint idx)
connect the next input slot to existing lead-node given by index
void retrieve(void *streamType)
void build()
Terminal: trigger the Level-3 build walk to produce a ProcNode network.
string genProcSpec() const
render a descriptor for the operation (without predecessors)
static ProcID & describe(StrView nodeSymb, StrView portSpec, ProcAttrib extAttrib=ProcAttrib{})
build and register a processing ID descriptor
Key abstraction of the Render Engine: A Data processing Node.
Port & getPort(uint portIdx)
Communication hub to coordinate and activate the »Render Node Network« performance.
auto & get(ACC const &getter)
get parameter from extension block, as configured by the provided getter functor
Processing structure to activate a Render Node and produce result data.
Types marked with this mix-in may be moved but not copied.
A front-end for using printf-style formatting.
Lumiera error handling (C++ interface).
Iterator-style access handle to a referred container with subscript index.
AllocationPolicy< I, E, std::allocator > HeapOwn
Default configuration to use heap memory for lib::Several.
Extension point: how to configure the SeveralBuilder to use an allocator ALO, initialised by ARGS.
LumieraError< LERR_(LOGIC)> Logic
lib::allo::HeapOwn< I, E > Policy
auto prepareNode(StrView nodeSymbol)
Entrance point for building actual Render Node Connectivity (Level-2)
std::integral_constant< uint, siz > SizMark
auto retrieve(void *streamType)
Entrance point for defining data flows and processing steps.
Steam-Layer implementation namespace root.
bool isSameObject(A const &a, B const &b)
compare plain object identity, based directly on the referee's memory identities.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Construction kit to establish a set of parameters pre-computed prior to invocation of nested nodes.
Interface to the processing nodes and the Render Nodes network.
Builder to create and populate instances of the lib::Several container.
FeedPrototype< FUN > Prototype
cross-builder: Prototype can be used to attach parameter-provider-functors and then to create several...
Specification record for the setup of a »Param Agent Node«.
Implementation for a Weaving Pattern to conduct extended parameter evaluation.
Extended Attributes for ProcID metadata.
A low-level Builder to prepare and adapt for a specific node invocation.
Fixed standard setup used in each Port of the Render Node to generate data.
Construction kit to establish an invocation scheme for media calculations.