Invocation: introduce optional output buffer
Doing so directly seems to be a better solution than to inject an OutputBufferProvider; the latter will still be needed, yet will not be part of the regular weaving pattern, but used directly at top-level to obtain the output `BuffHandle`, which is then passed to the `Port::weave()` call
This commit is contained in:
parent
4bda550f68
commit
38dd3a738e
4 changed files with 71 additions and 78 deletions
|
|
@ -55,6 +55,7 @@
|
|||
#include "lib/several.hpp"
|
||||
|
||||
#include <vector>
|
||||
#include <optional>
|
||||
|
||||
|
||||
|
||||
|
|
@ -69,6 +70,7 @@ namespace engine {
|
|||
class ProcNode;
|
||||
// typedef ProcNode* PNode;
|
||||
using ProcNodeRef = std::reference_wrapper<ProcNode>;
|
||||
using OptionalBuff = std::optional<BuffHandle>;
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Rebuild the Node Invocation
|
||||
|
||||
class Port
|
||||
|
|
@ -76,7 +78,7 @@ namespace engine {
|
|||
public:
|
||||
virtual ~Port(); ///< this is an interface
|
||||
|
||||
virtual BuffHandle weave (TurnoutSystem&) =0;
|
||||
virtual BuffHandle weave (TurnoutSystem&, OptionalBuff =std::nullopt) =0;
|
||||
};
|
||||
|
||||
using PortRef = std::reference_wrapper<Port>;
|
||||
|
|
|
|||
|
|
@ -442,11 +442,13 @@ namespace engine {
|
|||
}
|
||||
|
||||
void
|
||||
shed (Feed& feed)
|
||||
shed (Feed& feed, OptionalBuff outBuff)
|
||||
{
|
||||
for (uint i=0; i<outTypes.size(); ++i)
|
||||
{
|
||||
BuffHandle resultData = outTypes[i].lockBuffer(); //////////////////////////OOO LocalTag for output must be injected here -- just HOW???
|
||||
BuffHandle resultData =
|
||||
i == resultSlot and outBuff? *outBuff
|
||||
: outTypes[i].lockBuffer();
|
||||
feed.outBuff.createAt(i, move(resultData));
|
||||
}
|
||||
feed.connect (leadPort.size(),outTypes.size());
|
||||
|
|
@ -468,7 +470,7 @@ namespace engine {
|
|||
for (uint i=0; i<outTypes.size(); ++i)
|
||||
{
|
||||
feed.outBuff[i].emit();
|
||||
if (i != feed.resultSlot)
|
||||
if (i != resultSlot)
|
||||
feed.outBuff[i].release();
|
||||
}
|
||||
ENSURE (resultSlot < CONF::MAX_SIZ, "invalid result buffer configured.");
|
||||
|
|
@ -502,11 +504,11 @@ namespace engine {
|
|||
* @return a BuffHandle exposing the generated result data
|
||||
*/
|
||||
BuffHandle
|
||||
weave (TurnoutSystem& turnoutSys) override
|
||||
weave (TurnoutSystem& turnoutSys, OptionalBuff outBuff =std::nullopt) override
|
||||
{
|
||||
Feed feed = PAT::mount();
|
||||
PAT::pull(feed, turnoutSys);
|
||||
PAT::shed(feed);
|
||||
PAT::shed(feed, outBuff);
|
||||
PAT::weft(feed);
|
||||
return PAT::fix (feed);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ namespace engine {
|
|||
std::vector<ProviderRef> providers;
|
||||
|
||||
uint resultSlot{0};
|
||||
bool isOutput{false};
|
||||
|
||||
struct ServiceCtx
|
||||
{
|
||||
|
|
@ -119,16 +118,6 @@ namespace engine {
|
|||
return move(*this);
|
||||
}
|
||||
|
||||
SimpleWeavingBuilder
|
||||
markAsOutputNode()
|
||||
{
|
||||
maybeFillDefaultProviders (resultSlot+1);
|
||||
ENSURE (providers.size() > resultSlot);
|
||||
providers[resultSlot] = ctx.output;
|
||||
this->isOutput = true;
|
||||
return move(*this);
|
||||
}
|
||||
|
||||
|
||||
auto
|
||||
build()
|
||||
|
|
|
|||
|
|
@ -5609,9 +5609,7 @@
|
|||
</node>
|
||||
<node CREATED="1537659527741" ID="ID_856745741" MODIFIED="1679362063141" TEXT="building blocks">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
<b>Definition</b>: speziell konfigurierte und verdrahtete Teil-Komponenten,
|
||||
|
|
@ -5651,9 +5649,7 @@
|
|||
</node>
|
||||
<node CREATED="1537961656982" ID="ID_1251358269" MODIFIED="1576282358140" TEXT="frameworks">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
vorbereitete Grundstrukturen für immer wiederkehrende Setups
|
||||
|
|
@ -5680,9 +5676,7 @@
|
|||
</node>
|
||||
<node CREATED="1537961950003" ID="ID_1083792924" MODIFIED="1576282358140" TEXT="Schema "managing container"">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...denn das erscheint mir bodenständiger.
|
||||
|
|
@ -6014,9 +6008,7 @@
|
|||
</node>
|
||||
<node COLOR="#338800" CREATED="1538696720743" ID="ID_50558236" MODIFIED="1576282358138" TEXT="ersatzlos entfernt">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
CSS genügt
|
||||
|
|
@ -6484,9 +6476,7 @@
|
|||
</node>
|
||||
<node CREATED="1485902945474" HGAP="-2" ID="ID_269152626" MODIFIED="1576282358134" TEXT="Lösungs-Detail: dynamisch koppeln" VSHIFT="19">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...meint:
|
||||
|
|
@ -7150,9 +7140,7 @@
|
|||
</node>
|
||||
<node CREATED="1506180752098" ID="ID_1971122985" MODIFIED="1576282358130" TEXT="can be a anchored">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...by interpolation of some wildcards
|
||||
|
|
@ -8516,9 +8504,7 @@
|
|||
<node CREATED="1510365961732" ID="ID_1589378310" MODIFIED="1510365980084" TEXT="return x = \s -> (x, s) "/>
|
||||
<node CREATED="1510365961733" FOLDED="true" ID="ID_188006936" MODIFIED="1512926191735">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
m >>= f = \r -> let (x, s) = m r
|
||||
|
|
@ -11623,9 +11609,7 @@
|
|||
</node>
|
||||
<node CREATED="1513961838174" ID="ID_579783999" MODIFIED="1513962463112" TEXT="Verhältnis der VTable-APIs noch unklar">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Was ist <b>Nav</b> und was ist <b>Iteration-control</b>?
|
||||
|
|
@ -16197,9 +16181,7 @@
|
|||
<node CREATED="1504834569831" ID="ID_1909335075" MODIFIED="1518487921074" TEXT="maximal 2 Viewer Panel"/>
|
||||
<node CREATED="1504883107916" ID="ID_1351734300" MODIFIED="1518487921074">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
alloc = limitPerWindow(2)
|
||||
|
|
@ -16223,9 +16205,7 @@
|
|||
<node CREATED="1504833572687" ID="ID_715257949" MODIFIED="1533608413811" TEXT="(Asset)Bin">
|
||||
<node CREATED="1504834228100" ID="ID_189081279" MODIFIED="1518487921074">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
im Asset-Panel der <i>jeweiligen</i> Gruppe hinzufügen
|
||||
|
|
@ -16235,9 +16215,7 @@
|
|||
</node>
|
||||
<node CREATED="1504883110076" ID="ID_199732103" MODIFIED="1518487921074">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
alloc = unlimited
|
||||
|
|
@ -16259,9 +16237,7 @@
|
|||
<node CREATED="1504834859584" ID="ID_693499241" MODIFIED="1518487921074" TEXT="im aktuellen Infobox-Panel"/>
|
||||
<node CREATED="1504883112068" ID="ID_308640581" MODIFIED="1518487921074">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
alloc = limitPerWindow(1)
|
||||
|
|
@ -16289,9 +16265,7 @@
|
|||
<node CREATED="1504880685783" ID="ID_1363213536" MODIFIED="1518487921075" TEXT="vom Speziellsten zum Allgemeinen"/>
|
||||
<node CREATED="1504880722394" ID="ID_1620814124" MODIFIED="1561827465196">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Voraussetzung: <i>Anwendbarkeit</i> erkennen
|
||||
|
|
@ -51653,9 +51627,7 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1491008088699" ID="ID_1501876595" MODIFIED="1576282357991" TEXT="Basisfall läuft noch nicht">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
die Instanz kommt nicht in der Fixture-Queue an
|
||||
|
|
@ -51668,9 +51640,7 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1491498978878" ID="ID_1001760576" MODIFIED="1576282357991" TEXT="nicht direkt">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
der Umstand, daß Commands auch ausgeführt werdern können,
|
||||
|
|
@ -51683,9 +51653,7 @@
|
|||
</node>
|
||||
<node CREATED="1491499005954" ID="ID_1944400975" MODIFIED="1576282357990" TEXT="aber im Hinblick auf den Lebenszyklus">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...denn ein Command geht dann in die Queue
|
||||
|
|
@ -51719,9 +51687,7 @@
|
|||
</node>
|
||||
<node CREATED="1491753170924" ID="ID_1947747818" MODIFIED="1576282357989" TEXT="Command-Zugriff ist by value">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...aus gutem Grund
|
||||
|
|
@ -51759,9 +51725,7 @@
|
|||
</node>
|
||||
<node CREATED="1491753354116" ID="ID_1070880433" MODIFIED="1576282357989" TEXT="Bus + CommandHandler + GenNode">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
aber sich mit einem Refcount verrückt machen.....
|
||||
|
|
@ -51781,9 +51745,7 @@
|
|||
<node CREATED="1491659224630" ID="ID_837055372" MODIFIED="1491659238608" TEXT="Entscheidung anhand der Command-ID"/>
|
||||
<node CREATED="1491694300867" ID="ID_1838809343" MODIFIED="1576282357988" TEXT="Festlegung: CommandID wird als Symbol entgegengenommen">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
....künftige Weiterung:
|
||||
|
|
@ -51799,9 +51761,7 @@
|
|||
</node>
|
||||
<node CREATED="1491659382161" ID="ID_948768193" MODIFIED="1576282357988" TEXT="Performance: maybeGet">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
da dieser Zugriff wirklich für jedes Command passiert,
|
||||
|
|
@ -88916,10 +88876,36 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</html></richcontent>
|
||||
<arrowlink COLOR="#ff2d7f" DESTINATION="ID_327945127" ENDARROW="Default" ENDINCLINATION="3056;127;" ID="Arrow_ID_824161116" STARTARROW="None" STARTINCLINATION="309;-17;"/>
|
||||
</node>
|
||||
<node CREATED="1722444761326" ID="ID_1520971495" MODIFIED="1722445151092" TEXT="man könnte tatsächlich den Aufruf mit zusätzlichem Argument ermöglichen">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
dieser würde dann nur von top-Level aus so erfolgen, womit der Spezialfall ganz natürlich ausgewählt wäre
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1722393034722" ID="ID_1964241515" MODIFIED="1722393053508" TEXT="Eine Nacht darüber schlafen!">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1722444566657" ID="ID_901551782" MODIFIED="1722444590633" TEXT="Es genügt, den OutputBufferProvider anders einzubinden">
|
||||
<node CREATED="1722444599708" ID="ID_502437622" MODIFIED="1722444698749" TEXT="das Konzept als Solches ist in Ordnung">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...d.h. daß man das Output-Protokoll hinter einem BufferProvider versteckt, um einen uniformen Zugriff zu ermöglichen.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1722444704965" ID="ID_329807269" MODIFIED="1722444730742" TEXT="Aber: nicht den BufferProvider austauschen, sondern bloß das BuffHandle"/>
|
||||
<node CREATED="1722445156984" ID="ID_204443476" MODIFIED="1722445177473" TEXT="der spezielle BufferProvider würde außerhalb, im Top-Level verwendet"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#5b280f" CREATED="1722379006311" ID="ID_665293589" MODIFIED="1722380080995" TEXT="Möglichkeit-4 ist oberflächlich clever — aber inhaltlich inkonsequent">
|
||||
|
|
@ -88999,9 +88985,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<arrowlink COLOR="#3159bc" DESTINATION="ID_1809654586" ENDARROW="Default" ENDINCLINATION="151;-415;" ID="Arrow_ID_946061354" STARTARROW="None" STARTINCLINATION="-305;0;"/>
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node CREATED="1722384774724" ID="ID_231403168" MODIFIED="1722384802636" TEXT="das bestehende API für Output-Management deckt diesen Fall bereits komplett ab"/>
|
||||
<node CREATED="1722384803792" ID="ID_450967698" MODIFIED="1722384876816" TEXT="es genügt, ein zusätzliches LocalTag beim Belegen des speziellen Output-»Slot« mit zugeben">
|
||||
<node CREATED="1722384803792" ID="ID_450967698" MODIFIED="1722445233553" TEXT="es genügt, ein zusätzliches LocalTag in das Typ-Feld für das BuffHandle einzubauen">
|
||||
<linktarget COLOR="#8c1444" DESTINATION="ID_450967698" ENDARROW="Default" ENDINCLINATION="-313;-10;" ID="Arrow_ID_414353144" SOURCE="ID_128884200" STARTARROW="None" STARTINCLINATION="-367;0;"/>
|
||||
</node>
|
||||
<node CREATED="1722445242908" ID="ID_1389873312" MODIFIED="1722445279859" TEXT="allerdings wird dieses speziell präparierte BuffHandle besser direkt eingefügt"/>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1722384890441" ID="ID_438526459" MODIFIED="1722385120612" TEXT="zu klären bleibt: wie wird diese Info genau eingebunden?">
|
||||
<arrowlink COLOR="#932840" DESTINATION="ID_657216791" ENDARROW="Default" ENDINCLINATION="103;-2;" ID="Arrow_ID_1546346335" STARTARROW="None" STARTINCLINATION="-431;18;"/>
|
||||
<icon BUILTIN="help"/>
|
||||
|
|
@ -89083,6 +89070,19 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1722445295029" ID="ID_1963170563" MODIFIED="1722445346948" TEXT="also: gar nicht markieren — sondern übersteuern">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
die Ausnahme überhaupt gar nicht über die Konfiguration/Verdrahtung einführen, sondern direkt in den Aufruf
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<node CREATED="1722445348793" ID="ID_1622065787" MODIFIED="1722445364447" TEXT="zusätzliches Argument: optional<BuffHandle>"/>
|
||||
<node CREATED="1722445366619" ID="ID_1805188384" MODIFIED="1722445398466" TEXT="wenn gegeben ⟹ der für den Slot konfigurierte BufferProvider wird überhaupt nicht verwendet"/>
|
||||
<node CREATED="1722445400526" ID="ID_270562222" MODIFIED="1722445411968" TEXT="dafür ist nur ein einziger Eingriff in shed() notwendig"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue