From 968bfb8fabe232f5a7746bf9324cb93236b506e4 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 15 Jul 2024 01:25:38 +0200 Subject: [PATCH] Invocation: look for ways how to build the Turnout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems we need a `WeavingPattern`-Builder, which obviously must be rather flexible, since those patterns are to be composed from several layers, which should be extensible within a given ''Domain Ontology'' So this seems to lead to a builder-DSL which creates »**onion layers**« of builders, with the ability to extend and specialise the type on each layer. ''As it will be quite challenging to get this into usable shape, it seems best to approach this step by step through prototyping...'' --- src/steam/engine/turnout.hpp | 31 +++++++- wiki/thinkPad.ichthyo.mm | 137 ++++++++++++++++++++++++----------- 2 files changed, 122 insertions(+), 46 deletions(-) diff --git a/src/steam/engine/turnout.hpp b/src/steam/engine/turnout.hpp index b8aa9a79c..3bf6a9b91 100644 --- a/src/steam/engine/turnout.hpp +++ b/src/steam/engine/turnout.hpp @@ -394,6 +394,7 @@ namespace engine { */ template struct Conf_DirectFunctionInvocation + //////////////////////////////OOO non-copyable? move-only?? { using Manifold = FeedManifold; using Feed = SimpleFunctionInvocationAdapter; @@ -416,8 +417,7 @@ namespace engine { using Storage = lib::UninitialisedStorage; - Storage leadPort; - Storage inDescr; + Storage leadPort; Storage outDescr; //////////////////////////////////////////OOO builder must set-up those descriptors @@ -483,6 +483,7 @@ namespace engine { class Turnout : public Port , public PAT + //////////////////////////////OOO non-copyable? move-only?? { using Feed = typename PAT::Feed; public: @@ -503,6 +504,32 @@ namespace engine { return feed.result(); } }; + +/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Prototyping: how to assemble a Turnout + template + using SimpleDirectInvoke = SimpleWeavingPattern>; + + template + struct SimpleWeavingBuilder + : Turnout> + { + SimpleWeavingBuilder + attachToLeadPort(ProcNode& lead, uint portNr) + { + ASSERT (this->fanIn < N); + PortRef leadPort; /////////////////////////////////////OOO TODO need Accessor on ProcNode!!!!! + this->leadPort.createAt(this->fanIn, leadPort) + ++(this->fanIn); + return move(*this); + } + + Turnout> + build() + { + return move(*this); + } + }; +/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : (End)Prototyping: how to assemble a Turnout diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 0f248961a..ffa432f12 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -1855,9 +1855,7 @@ - - - +

...ob beim Expand/Collapse das umschließende Widget resized werden soll @@ -1904,9 +1902,7 @@ - - - +

als denjenigen Container... @@ -1924,9 +1920,7 @@ - - - +

ggfs müssen alle anderen Funktionen nach unten delegieren @@ -2606,9 +2600,7 @@ - - - +

GTK-Konzepte: "Schließen" @@ -3754,9 +3746,7 @@ - - - +

...und zwar an dem Punkt, an dem ich eine DiffMessage in das GUI schicke. @@ -5138,9 +5128,7 @@ - - - +

»die Timeline« @@ -6921,9 +6909,7 @@ - - - +

...stattdessen einen Fehler-Indikator auslösen @@ -9458,9 +9444,7 @@ - - - +

und zwar in dem Moment, wo man die Layer zusammensetzt. @@ -80555,8 +80539,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + @@ -81057,11 +81041,11 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - + @@ -81081,8 +81065,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- - + + @@ -81210,7 +81194,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + @@ -81579,7 +81564,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + + @@ -81594,9 +81580,9 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + - + @@ -81710,13 +81696,13 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- +

  • - in einem früheren Build-Schritt wird festgestellt, welche Eingabeparameter eine Lib-Funktion braucht + in einem früheren Build-Schritt wird festgestellt,
    welche Eingabeparameter eine Lib-Funktion braucht
  • für alle diese Eingabe-Parameter wird eine Quelle vorgemerkt @@ -81753,7 +81739,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
    - + @@ -81762,6 +81748,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200

    +
    @@ -86933,8 +86920,11 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
    - + + + + @@ -88109,8 +88099,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
    ein emitBuffer() erfolgen soll

    - - + @@ -88129,12 +88118,74 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

    + aber festgelegt wird sie beim Bauen des Turnout +

    + + +
    +
    +
    +
    +
    @@ -127521,8 +127572,7 @@ std::cout << tmpl.render({"what", "World"}) << s
- -
+
@@ -127556,8 +127606,7 @@ std::cout << tmpl.render({"what", "World"}) << s Achtung: nicht idempotent

- - +