Invocation: difficulties with defining a suitable DataBuilder
As a direct consequence of the insights regarding Dependency-Injection, a ''Builder Toolkit'' is required, which can be used to adapt various kinds of ''Weaving Patterns'' — since obviously it is not possible to settle down on a single Pattern, and thus several ''families of builders'' will emerge, one for each ''line of construction'' for ''Weaving Patterns''. To stress this point, what I am coding here is a prototype, aimed at being used as part of a **Test Domain Ontology** — and other Domain Ontologies (e.g. für FFmpeg) will certainly require other construction schemes for their Weaving Patterns. So this is an open field, and can not be settled once and for all. This immediately leads to another, rather technical problem: If we're about to work with ''delegate Builders,'' then also a way to pass-down the allocator configuration is required. We had settled on a preliminary solution with the helper `DataBuilder`, yet this solution looks like it defines how `lib::SeveralBuilder` should be used in most of the cases. So there is now a conflict between the existing definition scheme for `lib::SeveralBuilder`, which was achieved in a bottom-up way, and a slightly different definition scheme ''as it should be'' Starting to attack this latter detail problem, as a first step, the definition of `DataBuilder` can be simplified by collapsing it with the `lib::allo::SetupSeveral`
This commit is contained in:
parent
fc9ff9252a
commit
2fd3629d80
2 changed files with 96 additions and 60 deletions
|
|
@ -112,27 +112,17 @@ namespace engine {
|
|||
template<template<typename> class ALO =std::void_t, typename...INIT>
|
||||
struct AlloPolicySelector
|
||||
{
|
||||
template<class I, class E=I>
|
||||
static auto
|
||||
setupBuilder (INIT&& ...alloInit)
|
||||
{
|
||||
return lib::makeSeveral<I,E>()
|
||||
.template withAllocator<ALO> (forward<INIT> (alloInit)...);
|
||||
}
|
||||
using Setup = lib::allo::SetupSeveral<ALO,INIT...>;
|
||||
|
||||
template<class I, class E>
|
||||
using PolicyForAllo = typename Setup::template Policy<I,E>;
|
||||
|
||||
template<class I, class E=I>
|
||||
using BuilderType = decltype(setupBuilder<I,E> (std::declval<INIT>()...));
|
||||
using BuilderType = lib::SeveralBuilder<I,E, PolicyForAllo<I,E>>;
|
||||
};
|
||||
|
||||
struct UseHeapAlloc
|
||||
{
|
||||
template<class I, class E=I>
|
||||
static auto
|
||||
setupBuilder()
|
||||
{
|
||||
return lib::makeSeveral<I,E>();
|
||||
}
|
||||
|
||||
template<class I, class E=I>
|
||||
using BuilderType = lib::SeveralBuilder<I,E>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2604,9 +2604,7 @@
|
|||
<node CREATED="1534630195728" FOLDED="true" ID="ID_1711320497" MODIFIED="1561827464627" TEXT="was brauche ich?">
|
||||
<node CREATED="1534630216909" FOLDED="true" ID="ID_1211516480" MODIFIED="1561827464626">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
wenn Log-Anzeige <i>verworfen</i> wird
|
||||
|
|
@ -2656,9 +2654,7 @@
|
|||
</node>
|
||||
<node CREATED="1534630941563" ID="ID_701586360" MODIFIED="1534631013681" TEXT="Code im dtor entfernt das Panel aus dem DockItem">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Erläuterung: DockItem ist ein 1-elementiger GTK-Container,
|
||||
|
|
@ -2725,9 +2721,7 @@
|
|||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1534636203306" ID="ID_1590219615" MODIFIED="1534636301238" TEXT="wird nicht vom Framework bereitgestellt">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
das ist das Fazit meiner Untersuchung.
|
||||
|
|
@ -2772,9 +2766,7 @@
|
|||
</node>
|
||||
<node COLOR="#338800" CREATED="1534729080597" ID="ID_1547931497" MODIFIED="1538263469671" TEXT="Code durchgesehen: alle Zugriffe sauber">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
entweder sie laufen über den Getter,
|
||||
|
|
@ -3266,9 +3258,7 @@
|
|||
</node>
|
||||
<node COLOR="#338800" CREATED="1538319535006" ID="ID_403817336" MODIFIED="1538365635663" TEXT="Fix: Handler kann genausogut auf std::exception abstellen">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...denn wir verwenden das Lumiera-Exception-API gar nicht
|
||||
|
|
@ -3963,9 +3953,7 @@
|
|||
</node>
|
||||
<node COLOR="#435e98" CREATED="1488419591265" HGAP="65" ID="ID_471609909" MODIFIED="1538840175237" VSHIFT="70">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
zieht komplett-Umbau
|
||||
|
|
@ -5372,9 +5360,7 @@
|
|||
<node CREATED="1665345276391" ID="ID_1994007828" MODIFIED="1665345283311" TEXT="Grundsätzliches">
|
||||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1665345284722" ID="ID_1079113450" MODIFIED="1665345322919">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
»professionell« bedeutet: <b>unaufdringlich</b> und <b>klar</b>
|
||||
|
|
@ -6839,9 +6825,7 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1489461773213" ID="ID_344390825" MODIFIED="1576282358133" TEXT="als Treiber verwenden">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...um die Entwicklung des Designs zu erzwingen
|
||||
|
|
@ -8567,9 +8551,7 @@
|
|||
<node CREATED="1510342662644" FOLDED="true" ID="ID_1670214510" MODIFIED="1525124214795" TEXT="geht nur wenn....">
|
||||
<node CREATED="1510342668115" ID="ID_858941678" MODIFIED="1511572072407">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
alles mit <i>einer</i> Form des IterExplorer machbar ist
|
||||
|
|
@ -10658,9 +10640,7 @@
|
|||
</node>
|
||||
<node CREATED="1512181592137" FOLDED="true" ID="ID_1472433606" MODIFIED="1512926193417" TEXT="im Ergebnis folgenlos, aber gefährlich">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
weil der Aufruf von join(&&) selber wasserdicht ist
|
||||
|
|
@ -13747,9 +13727,7 @@
|
|||
<node CREATED="1518745834329" ID="ID_877601312" MODIFIED="1518745855890" TEXT="nicht klar, ob es gerechtfertigt ist, hierfür solche Komplexitäten zu schaffen"/>
|
||||
<node CREATED="1518745857950" ID="ID_1572087161" MODIFIED="1518745944379" TEXT="wenn sollte man es besser explizit als Spezialfall hart-coden">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...statt die gesamte Matching-Engine mit einer Art
|
||||
|
|
@ -52925,9 +52903,7 @@
|
|||
</node>
|
||||
<node CREATED="1492281019743" ID="ID_948470933" MODIFIED="1492281049526">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
grundlegender Widerspruch
|
||||
|
|
@ -86692,8 +86668,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
ein Zwischending: <b><font face="Monospaced">BufferDescriptor</font></b>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</html></richcontent>
|
||||
<linktarget COLOR="#516883" DESTINATION="ID_562004793" ENDARROW="Default" ENDINCLINATION="-1136;1066;" ID="Arrow_ID_1799901944" SOURCE="ID_824337184" STARTARROW="None" STARTINCLINATION="-504;-31;"/>
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1721055699118" ID="ID_737732212" MODIFIED="1721055713648" TEXT="steht außerhalb des Buffer-handling-Protocol"/>
|
||||
|
|
@ -86714,8 +86689,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node CREATED="1721056911246" ID="ID_1624189638" MODIFIED="1721056920388" TEXT="Einsichten/Feststellungen">
|
||||
<icon BUILTIN="forward"/>
|
||||
|
|
@ -86728,8 +86702,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
...im Gegensatz zum Baumuster des Node-Graphen, der stets abwärts gerichtet ist: eine Node kennt nur ihre Vorläufer, aber der BufferDescriptor verweist aufwärts auf einen globalen Service
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</html></richcontent>
|
||||
<arrowlink COLOR="#741b46" DESTINATION="ID_1203624262" ENDARROW="Default" ENDINCLINATION="387;-47;" ID="Arrow_ID_1836206594" STARTARROW="None" STARTINCLINATION="-442;32;"/>
|
||||
<arrowlink COLOR="#582132" DESTINATION="ID_969123904" ENDARROW="Default" ENDINCLINATION="228;-13;" ID="Arrow_ID_617307110" STARTARROW="None" STARTINCLINATION="-442;32;"/>
|
||||
</node>
|
||||
|
|
@ -87725,6 +87698,74 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1721169608761" ID="ID_363153482" MODIFIED="1721169773780" TEXT="daraus eine generische Lösung machen">
|
||||
<linktarget COLOR="#91084e" DESTINATION="ID_363153482" ENDARROW="Default" ENDINCLINATION="-628;2110;" ID="Arrow_ID_1635944215" SOURCE="ID_137792611" STARTARROW="None" STARTINCLINATION="175;-879;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1721169639614" ID="ID_707001240" MODIFIED="1721169642481" TEXT="warum?">
|
||||
<node CREATED="1721169643875" ID="ID_782220433" MODIFIED="1721169663330" TEXT="weil es gar nicht speziell von diesem Builder-Setup abhängt"/>
|
||||
<node CREATED="1721169663692" ID="ID_1013263349" MODIFIED="1721169683417" TEXT="weil so etwas in praktisch jedem Builder mit lib::Several auftreten wird"/>
|
||||
<node CREATED="1721169684391" ID="ID_551192803" MODIFIED="1721169703440" TEXT="weil es effektiv nichts anderes ist, als der SeveralBuilder selber"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eef0c5" COLOR="#990000" CREATED="1721170586832" ID="ID_545202834" MODIFIED="1721175437912" TEXT="Definitionen geeignet arrangieren">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f61" CREATED="1721171395677" ID="ID_1131511599" MODIFIED="1721174710231" STYLE="bubble" TEXT="�� es geht wirklich nur um eine kompakte und lesbare Schreibweise">
|
||||
<edge COLOR="#d53232"/>
|
||||
</node>
|
||||
<node COLOR="#5b280f" CREATED="1721170599817" ID="ID_1727033280" MODIFIED="1721174636718" TEXT="es ist eigentlich nur ein Benennungs/Definitions-Problem">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Alle Typen sind bekannt und bereits angeschrieben; die neulich gefundene Lösung mit dem decltype(<builder>)-Trick hat mich zwar zum Ziel gebracht, ist aber unnötig indirekt — man könnte durchaus die Typen ineinander einsetzen und dann in eine einzige Typedef reduzieren
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1721174638056" ID="ID_1423112088" MODIFIED="1721174644592" TEXT="nein: doch nicht ganz..."/>
|
||||
<node CREATED="1721174645372" ID="ID_940405790" MODIFIED="1721174658046" TEXT="es geht schon um die Anordnung der Typ-Parameter"/>
|
||||
</node>
|
||||
<node CREATED="1721170938931" ID="ID_886986243" MODIFIED="1721171182197">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Namens-Idee: <b>AlloPolicySelector</b>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1721171183918" ID="ID_1312928828" MODIFIED="1721174829989" TEXT="aber... das ist doch genau allo::SetupSeveral<ALO,ARGS...>">
|
||||
<arrowlink COLOR="#fefcc9" DESTINATION="ID_1620829594" ENDARROW="Default" ENDINCLINATION="-60;-64;" ID="Arrow_ID_864095772" STARTARROW="None" STARTINCLINATION="-82;4;"/>
|
||||
</node>
|
||||
<node CREATED="1721172592598" ID="ID_1132932909" MODIFIED="1721172620314" TEXT="Policy als Template-Template vs. expliziter Typ-Parameter">
|
||||
<node CREATED="1721172777672" ID="ID_890705063" MODIFIED="1721172800961" TEXT="das Problem ist: lib::SeveralBuilder nimmt die POL als expliziter Typ-Parameter"/>
|
||||
<node CREATED="1721172802261" ID="ID_1062025435" MODIFIED="1721172815996" TEXT="dieser ist aber implizit von I und E abhängig">
|
||||
<node CREATED="1721172918263" ID="ID_1614072808" MODIFIED="1721172930448" TEXT="die API-Methoden nehmen einen Bucket* ">
|
||||
<node CREATED="1721172938824" ID="ID_395287966" MODIFIED="1721172945553" TEXT="Bucket = ArrayBucket<I>"/>
|
||||
</node>
|
||||
<node CREATED="1721173008292" ID="ID_1183769323" MODIFIED="1721173026821" TEXT="weiteres Problem: die Stanard-Impl nimmt ein 3.Typargument (ALO)">
|
||||
<node CREATED="1721173035609" ID="ID_420067425" MODIFIED="1721173043606" TEXT="AlocationPolicy<I,E,ALO>"/>
|
||||
<node CREATED="1721173048519" ID="ID_981820346" MODIFIED="1721173056258" TEXT="ALO ist selber wieder ein Template-Template"/>
|
||||
</node>
|
||||
<node CREATED="1721173120501" ID="ID_1407478548" MODIFIED="1721173134617" TEXT="genau das macht die Policy/Allocator-Selection so komplex"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1721174038501" ID="ID_879848085" MODIFIED="1721174127754" TEXT="⟹ der DataBuilder hat eine Signatur, wie man sie sich von lib::SeveralBuilder gewünscht hätte">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1721174132266" ID="ID_1912530197" MODIFIED="1721174154773" TEXT="da der SeveralBuilder bottom-up konstruiert wurde, habe ich das nicht geschafft"/>
|
||||
<node CREATED="1721174156169" ID="ID_137493922" MODIFIED="1721174261682" TEXT="erbt von einfachem Typ-Parameter — obwohl ein Template-Template wünschenswert wäre">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1721174754965" ID="ID_1620829594" MODIFIED="1721175429658" TEXT="Nebenschauplatz: den decltype()-Trick eliminieren">
|
||||
<linktarget COLOR="#fefcc9" DESTINATION="ID_1620829594" ENDARROW="Default" ENDINCLINATION="-60;-64;" ID="Arrow_ID_864095772" SOURCE="ID_1312928828" STARTARROW="None" STARTINCLINATION="-82;4;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1720454107471" ID="ID_1238813567" MODIFIED="1720454187970" TEXT="Allocator im Test verifizieren">
|
||||
<arrowlink COLOR="#ca3e80" DESTINATION="ID_1795755773" ENDARROW="Default" ENDINCLINATION="333;-16;" ID="Arrow_ID_778082175" STARTARROW="None" STARTINCLINATION="-512;47;"/>
|
||||
|
|
@ -88242,11 +88283,17 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="clanbomber"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1721061468811" ID="ID_137792611" MODIFIED="1721061603553" TEXT="brauche dann aber einen DataBuilder">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1721061468811" ID="ID_137792611" MODIFIED="1721169773780" TEXT="brauche dann aber einen DataBuilder">
|
||||
<arrowlink COLOR="#91084e" DESTINATION="ID_363153482" ENDARROW="Default" ENDINCLINATION="-628;2110;" ID="Arrow_ID_1635944215" STARTARROW="None" STARTINCLINATION="175;-879;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1721061478810" ID="ID_1413132436" MODIFIED="1721061494590" TEXT="das ist die gleiche Lösung, die ich schon für den NodeBuilder verwende">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1721169780631" ID="ID_1227400011" MODIFIED="1721169828363" TEXT="also handelt es sich um eine generische Lösung für beliebige lib::Several">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1721169840656" ID="ID_72435140" MODIFIED="1721169850986" TEXT="bedeutet: es muß noch weiter »rund« gemacht werden"/>
|
||||
<node CREATED="1721169851751" ID="ID_1051304468" MODIFIED="1721169865872" TEXT="es soll so einfach zu verwenden sein, wie lib::SeveralBuilder selber"/>
|
||||
</node>
|
||||
<node CREATED="1721061496223" ID="ID_1175711026" MODIFIED="1721061518294" TEXT="⟹ Konsequenz: kann nicht mehr das Produkt als Mix-In im Builder haben"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1721061520328" ID="ID_447898484" MODIFIED="1721061541850" TEXT="muß stattdessen das Produkt (Tunrout) explizit konstruieren">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
|
|
@ -88358,8 +88405,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
...denn wir verweisen darauf per Referenz oder Pointer
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1721057380696" ID="ID_1842742383" MODIFIED="1721057393025" TEXT="er besteht aus einem Satz BufferProvider"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue