From 0de790544498f1d2e52fff1ca932b76e722749e0 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 21 Oct 2024 03:40:19 +0200 Subject: [PATCH] Invocation: introduce pattern data holder into `NodeBuilder` - add an unspecified data holder type into the NodeBuilder - establish ability to cross-build a `NodeBuilder` with adapted data holder --- src/steam/engine/node-builder.hpp | 51 +++++---- src/steam/engine/weaving-pattern-builder.hpp | 9 +- wiki/thinkPad.ichthyo.mm | 107 +++++++++++-------- 3 files changed, 98 insertions(+), 69 deletions(-) diff --git a/src/steam/engine/node-builder.hpp b/src/steam/engine/node-builder.hpp index 2597e3971..b6ac96fac 100644 --- a/src/steam/engine/node-builder.hpp +++ b/src/steam/engine/node-builder.hpp @@ -128,10 +128,10 @@ namespace engine { using DataBuilder = lib::SeveralBuilder; - template + template class PortBuilderRoot; - template + template class NodeBuilder : util::MoveOnly { @@ -139,16 +139,25 @@ namespace engine { using LeadRefs = DataBuilder; protected: - PortData ports_; + PortData ports_; ///////////////////////////////////////OOO obsolete and replaced by patternData_ LeadRefs leads_; + DAT patternData_; + public: template NodeBuilder (INIT&& ...alloInit) - : ports_{forward (alloInit)...} + : ports_{forward (alloInit)...} /////////////OOO obsolete and replaced by patternData_ , leads_{forward (alloInit)...} { } + template + NodeBuilder (NodeBuilder&& pred, BUILD&& entryBuilder) + : ports_{} /////////////OOO obsolete and replaced by patternData_ + , leads_{move (pred.leads_)} + , patternData_{move (pred.patternData_), forward (entryBuilder)} + { } + NodeBuilder addLead (ProcNode const& lead) @@ -159,7 +168,7 @@ namespace engine { /** recursively enter detailed setup of a single processing port */ - PortBuilderRoot preparePort(); + PortBuilderRoot preparePort(); /** @@ -200,12 +209,12 @@ namespace engine { - template + template class PortBuilderRoot - : protected NodeBuilder + : protected NodeBuilder { public: - NodeBuilder + NodeBuilder completePort() { static_assert(not sizeof(POL), @@ -237,20 +246,20 @@ namespace engine { * the enclosed original builder temporarily; the terminal builder operation * PortBuilder::completePort() will unwrap and return the original NodeBuilder. */ - template - inline PortBuilderRoot - NodeBuilder::preparePort () + template + inline PortBuilderRoot + NodeBuilder::preparePort () { - return PortBuilderRoot{move(*this)}; + return PortBuilderRoot{move(*this)}; } - template + template class PortBuilder - : public PortBuilderRoot + : public PortBuilderRoot { - using _Par = PortBuilderRoot; + using _Par = PortBuilderRoot; WAB weavingBuilder_; @@ -310,13 +319,13 @@ namespace engine { /*************************************************************//** * Terminal: complete the Port wiring and return to the node level. */ - NodeBuilder + NodeBuilder ////////////////////////////////////////OOO need to extend and evolve the DAT parameter here completePort() { //////////////////////////////////////////////////////////OOO need to provide all links to lead nodes here weavingBuilder_.fillRemainingBufferTypes(); _Par::ports_.append(weavingBuilder_.build()); - return static_cast&&> (*this); + return static_cast&&> (*this); } // slice away the subclass private: @@ -326,17 +335,17 @@ namespace engine { , weavingBuilder_{forward (fun)} { } - friend class PortBuilderRoot; + friend class PortBuilderRoot; }; - template + template template auto - PortBuilderRoot::invoke (FUN&& fun) + PortBuilderRoot::invoke (FUN&& fun) { using WeavingBuilder_FUN = WeavingBuilder(), FUN>; - return PortBuilder{move(*this), forward (fun)}; + return PortBuilder{move(*this), forward (fun)}; } /* template diff --git a/src/steam/engine/weaving-pattern-builder.hpp b/src/steam/engine/weaving-pattern-builder.hpp index 62adb5068..85d325b91 100644 --- a/src/steam/engine/weaving-pattern-builder.hpp +++ b/src/steam/engine/weaving-pattern-builder.hpp @@ -249,13 +249,19 @@ namespace engine { PAR::collectEntries (dataBuilder, cntElm+1, max (siz,maxSiz)); buildEntry (dataBuilder); } + + + PatternData(PAR&& predecessor, BUILD&& entryBuilder) + : PAR{move (predecessor)} + , buildEntry{move (entryBuilder)} + { } }; /** * Data recursion end: prime the port data storage * by reserving appropriate storage to hold all known Turnout elements. */ - struct DimData + struct PatternDataAnchor { template void @@ -265,6 +271,7 @@ namespace engine { } }; + template using SimpleDirectInvoke = SimpleWeavingPattern>; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 575378b6e..b93269ab0 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -8767,9 +8767,7 @@ - - - +

_fun<FUN>::Sig scheitert @@ -9158,9 +9156,7 @@ - - - +

wir gehen davon aus, @@ -9946,9 +9942,7 @@ - - - +

jeder Zugriff auf ein Sub-Objekt muß durch eine VTable @@ -11291,9 +11285,7 @@ - - - +

...das heißt: @@ -12614,9 +12606,7 @@ - - - +

ViewLocator ruft die DSL auf @@ -14938,9 +14928,7 @@ - - - +

kann dazu führen, @@ -17893,9 +17881,7 @@ - - - +

Vorgabe ist ein Fenster(=Intervall) und dessen Position relativ zum Widget-Start. @@ -22797,9 +22783,7 @@ - - - +

die Vertiefungen im Anzeige-Profil @@ -49447,9 +49431,7 @@ - - - +

»Tangible« : Basis @@ -50053,9 +50035,7 @@ - - - +

Die Lösung für diese wecheslseitige Abhängigkeit @@ -50566,9 +50546,7 @@ - - - +

nach Perspektive @@ -50811,9 +50789,7 @@ - - - +

...wegen @@ -50930,9 +50906,7 @@ - - - +

Proc: CmdInstanceManager @@ -89750,7 +89724,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -89766,8 +89740,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + + + @@ -89781,6 +89757,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+
@@ -90037,8 +90014,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + @@ -90050,8 +90028,11 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + - + + @@ -90069,6 +90050,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + +
@@ -90108,8 +90093,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + @@ -90130,11 +90115,13 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + + @@ -90261,6 +90248,32 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + + + + + + + + +

+ ...damit die terminale Methode des PortBuilders nun nicht mehr den originalen NodeBuilder per slice-copy extrahiert, sondern stattdessen eine angepaßte Variante erzeugen kann, bei der ein »Zwiebelschalen-Layer« um die PatternData gelegt wird, während alle weiteren Daten per move weitergeschoben werden +

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