diff --git a/src/steam/engine/media-weaving-pattern.hpp b/src/steam/engine/media-weaving-pattern.hpp index 0bd8cd84f..06ce5a069 100644 --- a/src/steam/engine/media-weaving-pattern.hpp +++ b/src/steam/engine/media-weaving-pattern.hpp @@ -219,7 +219,7 @@ namespace engine { } void - shed (Feed& feed, OptionalBuff outBuff) + shed (Feed& feed, TurnoutSystem&, OptionalBuff outBuff) { for (uint i=0; i; BlockBuilder blockBuilder_; - - function postProcess_; + PostProcessor postProcess_; + Port& delegatePort_; struct Feed : util::NonCopyable { lib::UninitialisedStorage buffer; + OptionalBuff outBuff; DataBlock& block() { return buffer[0]; } @@ -222,39 +224,57 @@ namespace engine { /** forwarding-ctor to provide the detailed input/output connections */ - ParamWeavingPattern (BlockBuilder builder) + ParamWeavingPattern (BlockBuilder builder, PostProcessor postProc, Port& delegate) : blockBuilder_{move (builder)} + , postProcess_{move (postProc)} + , delegatePort_{delegate} { } + /** Preparation: create a Feed data frame to use as local scope */ Feed mount (TurnoutSystem& turnoutSys) { return Feed{}; } + /** Invoke the parameter-functors to create the basic parameter data */ void pull (Feed& feed, TurnoutSystem& turnoutSys) { - UNIMPLEMENTED ("pull parameter functors"); + feed.emplaceParamDataBlock (blockBuilder_, turnoutSys); } + /** 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. + */ void - shed (Feed& feed, OptionalBuff outBuff) + shed (Feed& feed, TurnoutSystem& turnoutSys, OptionalBuff outBuff) { - UNIMPLEMENTED ("connect and postprocess"); + turnoutSys.attachChainBlock(feed.block()); + feed.outBuff = outBuff; + if (postProcess_) + postProcess_(turnoutSys); } + /** recursively invoke the delegate port, while the generated + * parameter-data is indirectly reachable through the TurnoutSystem + */ void - weft (Feed& feed) + weft (Feed& feed, TurnoutSystem& turnoutSys) { - UNIMPLEMENTED ("forward to delegate"); + feed.outBuff = delegatePort_.weave (turnoutSys, feed.outBuff); } + /** clean-up: detach the parameter-data-block. + * @return the output buffer produced by the recursive delegate call. + */ BuffHandle - fix (Feed& feed) + fix (Feed& feed, TurnoutSystem& turnoutSys) { - UNIMPLEMENTED ("clean-up and return result buff"); + turnoutSys.detachChainBlock(feed.block()); + return feed.outBuff; } }; diff --git a/src/steam/engine/turnout.hpp b/src/steam/engine/turnout.hpp index 6d848a6e7..71563c531 100644 --- a/src/steam/engine/turnout.hpp +++ b/src/steam/engine/turnout.hpp @@ -94,9 +94,9 @@ namespace engine { using Feed = typename PAT::Feed; ASSERT_MEMBER_FUNCTOR (&PAT::mount, Feed(TurnoutSystem&)); ASSERT_MEMBER_FUNCTOR (&PAT::pull, void(Feed&, TurnoutSystem&)); - ASSERT_MEMBER_FUNCTOR (&PAT::shed, void(Feed&, OptionalBuff)); - ASSERT_MEMBER_FUNCTOR (&PAT::weft, void(Feed&)); - ASSERT_MEMBER_FUNCTOR (&PAT::fix, BuffHandle(Feed&)); + ASSERT_MEMBER_FUNCTOR (&PAT::shed, void(Feed&, TurnoutSystem&, OptionalBuff)); + ASSERT_MEMBER_FUNCTOR (&PAT::weft, void(Feed&, TurnoutSystem&)); + ASSERT_MEMBER_FUNCTOR (&PAT::fix, BuffHandle(Feed&, TurnoutSystem&)); return sizeof(PAT); } @@ -135,9 +135,9 @@ namespace engine { { Feed feed = PAT::mount (turnoutSys); PAT::pull (feed, turnoutSys); - PAT::shed (feed, outBuff); - PAT::weft (feed); - return PAT::fix (feed); + PAT::shed (feed, turnoutSys, outBuff); + PAT::weft (feed, turnoutSys); + return PAT::fix (feed, turnoutSys); } }; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index d57fb545f..fae09f6ac 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -82345,8 +82345,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
Das heißt, hier haben wir immer einen festen Satz an Parametern, die stets im TurnoutSystem eingebettet vorliegen; diese können aber als HeteroData-Chain erweitert werden um die Blöcke, die wir über eine (oder eine Kette von) ParamBuildSpec erzeugen

- - + @@ -94384,8 +94383,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
denn ich kann nicht ein non-copyable-Member fertig per Konstruktor bekommen....

- - + @@ -94400,7 +94398,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -94408,8 +94406,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
heißt, man müßte entweder explizit umkopieren, oder es bräuchte eine Konvention, wie man das (optional) gegebene BuffHandle dann eben doch frei gibt; letztlich wird ja ein BuffHandle zurückgegeben, und das wäre dann dasjenige, daß vom rekursiven Call belegt wurde. Könnte sogar klappen, ist aber als Trickserei zu werten.

- -
+
@@ -94421,8 +94418,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
Die Aufteilung in diese fünf Schritte dient vor allem der Gliederung der Abläufe; es ist aber nur bedingt ein »Protokoll«, in dem in bestimmten Schritten etwas Festgelegtes passieren muß...

- - +
@@ -94432,8 +94428,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
Wenn man Strukturen biegen, leer machen oder umdeuten muß...

- -
+
@@ -94497,8 +94492,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
...da gibt es definitiv keinen anderen Ausweg, und eigentlich wird ja dadurch auch erst die Builder-Notation wirklich sinnvoll; daß man ein non-copyable-Objekt aus einer Funktion „abwerfen“ kann ist sowiso grenzwertig....

- - + @@ -94522,8 +94516,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
(und ich mache es dennoch, weil ich weiß, daß für einen Film-Editor des geplanten Kallibers alle diese abgefuckten Sonderfälle dann später auch tatsächlich gefordert und eingesetzt werden) 

- - +
@@ -94552,26 +94545,28 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - - + + + - + - + - + + + @@ -94579,17 +94574,72 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + - + + + + + + + + + + + +

+ mit dem Ziel, die Einteilung des Weaving-Schemas zu erhalten und universeller nutzbar zu machen +

+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +