From 352ef31ab0e384e4a82e9670ac2936673c9e5bf6 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 22 Jul 2024 22:37:36 +0200 Subject: [PATCH] Invocation: further condense the allocator-selector definition After applying all the preceding refactorings, it turns out that the `DataBuilder` defined here ''is essentially `lib::SeveralBuilder`'', only with a different arrangement of the type parameters, due to the specific usage context here. It is thus possible to replace all the interim / helper / rebinding templates by simple templated typedefs. The only tangible difference is that for usage in the Builder, a ''selector policy'' is passed as a simple type argument, which in practice wires the concrete allocator information down into each sub-builder created during the ongoing construction of a node structure. --- src/steam/engine/node-builder.hpp | 23 +------ wiki/thinkPad.ichthyo.mm | 110 +++++++++++++++++++++++------- 2 files changed, 89 insertions(+), 44 deletions(-) diff --git a/src/steam/engine/node-builder.hpp b/src/steam/engine/node-builder.hpp index ea0791f55..18fabd513 100644 --- a/src/steam/engine/node-builder.hpp +++ b/src/steam/engine/node-builder.hpp @@ -110,21 +110,12 @@ namespace engine { namespace { // policy configuration for allocator template class ALO =std::void_t, typename...INIT> - struct AlloPolicySelector - { - using Setup = lib::allo::SetupSeveral; - - template - using PolicyForAllo = typename Setup::template Policy; - - template - using BuilderType = lib::SeveralBuilder; - }; + using AlloPolicySelector = lib::allo::SetupSeveral; struct UseHeapAlloc { template - using BuilderType = lib::SeveralBuilder; + using Policy = lib::allo::HeapOwn; }; // }//(End) internal policy configuration @@ -146,15 +137,7 @@ namespace engine { * \endcode */ template - class DataBuilder - : public POL::template BuilderType - { - public: - template - DataBuilder (INIT&& ...alloInit) - : POL::template BuilderType{forward (alloInit)...} - { } - }; + using DataBuilder = lib::SeveralBuilder; template diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index a4d0f64e0..bb5b88b09 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -3205,9 +3205,7 @@ - - - +

keines! Impl verwendet strdup() @@ -3292,9 +3290,7 @@ - - - +

...welches keinen separaten Thread aufruft....? @@ -3315,9 +3311,7 @@ - - - +

nämlich im shutdownAll() weiter oben im Stack @@ -3566,9 +3560,7 @@ - - - +

0000001028: INFO: proc-dispatcher.cpp:301: worker_2: processCommands: +++ dispatch Command("test_meta_markAction") {exec} @@ -5445,9 +5437,7 @@ - - - +

...damit das Icon in verschiedenstem Kontext gleichermaßen funktioniert @@ -7467,9 +7457,7 @@ - - - +

wie funktioniert @@ -10455,9 +10443,7 @@ - - - +

ist das #190 @@ -87731,7 +87717,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -87758,8 +87744,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
es bieteten sich an: lib::several und lib::allo ⟵ letzteres ist logischer!

- -
+
@@ -87768,6 +87753,83 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
+ + + + +

+ nach all den Vereinfachungen und Refactorings: das ist der ServeralBuilder  selber +

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

+ und wichtig: hier ist noch eine Selector-Policy darüber gesetzt +

+ +
+ + + + + + + +

+ diese Policy ist ein einfacher Typparameter +

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

+ using AllocatorPolicy = AlloPolicySelector<ALO,INIT...>; +

+ + +
+ +
+ + + + +

+ ⟶ withAllocator<ALO> (INIT&& ...) +

+ + +
+ +
+
+
+
+