Invocation: pass symbolic spec through the node builder
...taking into account the prospecive usage context where the builder expressions will be invoked from within a media-library plug-in, using std::string_view to pass the symbolic information seems like a good fit, because the given spec will typically be assembled from some building blocks, and thus in itself not be literal data.
This commit is contained in:
parent
4b6d812578
commit
5df93f01fc
9 changed files with 145 additions and 73 deletions
|
|
@ -100,7 +100,7 @@
|
|||
**
|
||||
** ## Data Access
|
||||
**
|
||||
** ** The [instantiation processing logic](\ref TextTemplate::Action::instantiate) is
|
||||
** The [instantiation processing logic](\ref TextTemplate::Action::instantiate) is
|
||||
** defined in terms of a *data binding*, represented as TextTemplate::DataSource.
|
||||
** This binding, assuming a _generic data access protocol,_ has to be supplied by
|
||||
** a concrete (partial) specialisation of the template `DataSource<DAT>`. This
|
||||
|
|
@ -108,11 +108,11 @@
|
|||
** actual format the data is available. Notably, bindings are pre-defined
|
||||
** for string data in a Map, and for Lumiera's »[External Tree Description]«
|
||||
** format, based on a [generic data node](\ref gen-node.hpp). Generally speaking,
|
||||
** the following _abstracted primitive operations_ are required to access data:
|
||||
** the following _abstracted primitive operations_ are required for accessing data:
|
||||
** - the `DataSource<DAT>` object itself is a copyable value object, representing
|
||||
** an _abstracted reference to the data._ We can assume that it stores a `const *`
|
||||
** internally, pointing to some data entity residing elsewhere in memory.
|
||||
** - it must somehow be possible, to generate a nested sub-data context, represented
|
||||
** - it must somehow be possible to generate a nested sub-data context, represented
|
||||
** by the same reference data type; this implies that there is some implementation
|
||||
** mechanism in place to tap into a _nested sub-scope_ within the data.
|
||||
** - `bool dataSrc.contains(key)` checks if a binding is available for the given \a key.
|
||||
|
|
@ -121,8 +121,8 @@
|
|||
** the _content_ bound to this \a key. This string content is assumed to remain stable
|
||||
** in memory during the instantiation process, which exposes a `std::string_view`
|
||||
** - `Iter getSequence(key)` attempts to _»open« a data sequence,_ assuming that the
|
||||
** \a key somehow links to data that can somehow be interpreted as a sequence of
|
||||
** nested sub-data-entities. The result is expected as »[Lumiera Forward Iterator]«.
|
||||
** \a key somehow links to data that can be interpreted in a way to yield a sequence
|
||||
** of nested sub-data-entities. The result is expected as »[Lumiera Forward Iterator]«.
|
||||
** - `DataSource<DAT> openContext(Iter)` is supplied with the \a Iter from `getSequence()`
|
||||
** and assumed to return a new data binding as `DataSource` object, tied to the nested
|
||||
** data entity or context corresponding to the current »yield« of the Iterator. This
|
||||
|
|
@ -148,7 +148,7 @@
|
|||
** \par ETD Binding
|
||||
** While the _Map Binding_ detailed in the preceding paragraph is mostly intended to handle
|
||||
** simple key substitutions, the more elaborate binding to `GenNode` data (ETD), which is
|
||||
** provided in the separate header text-template-gen-node-binding.hpp, is meant to handle
|
||||
** provided in the separate header text-template-gen-node-binding.hpp, is meant to handle
|
||||
** structural data, as encountered in the internal communication of components within the
|
||||
** Lumiera application — notably the »diff binding« used to populate the GUI with entities
|
||||
** represented in the _Session Model_ in Steam-Layer. The mapping is straight-forward, as the
|
||||
|
|
@ -470,9 +470,9 @@ namespace lib {
|
|||
void
|
||||
compile (PAR& parseIter, ActionSeq& actions)
|
||||
{
|
||||
auto currIDX = [&]{ return actions.size(); };
|
||||
auto valid = [&](Idx i){ return 0 < i and i < actions.size(); };
|
||||
auto clause = [](Clause c)-> string { return c==IF? "if" : "for"; };
|
||||
auto currIDX = [&]{ return actions.size(); };
|
||||
auto valid = [&](Idx i){ return 0 < i and i < actions.size(); };
|
||||
auto clause = [](Clause c)-> string { return c==IF? "if" : "for"; };
|
||||
auto scopeClause = [&]{ return scope_.empty()? "??" : clause(scope_.top().clause); };
|
||||
|
||||
// Support for bracketing constructs (if / for)
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
#include "lib/symbol.hpp"
|
||||
//#include "lib/symbol.hpp"//////////////////////////////TODO RLY?
|
||||
#include "lib/nocopy.hpp"
|
||||
#include "steam/engine/weaving-pattern-builder.hpp"
|
||||
#include "steam/engine/proc-node.hpp"
|
||||
|
|
@ -111,7 +111,7 @@ namespace steam {
|
|||
namespace engine {
|
||||
namespace err = lumiera::error;
|
||||
|
||||
using lib::Literal;
|
||||
// using lib::Literal;
|
||||
using util::_Fmt;
|
||||
using std::forward;
|
||||
using std::move;
|
||||
|
|
@ -156,18 +156,21 @@ namespace engine {
|
|||
using LeadRefs = DataBuilder<POL, ProcNodeRef>;
|
||||
|
||||
protected:
|
||||
StrView symbol_;
|
||||
LeadRefs leads_;
|
||||
DAT patternData_;
|
||||
|
||||
public:
|
||||
template<typename...INIT>
|
||||
NodeBuilder (INIT&& ...alloInit)
|
||||
: leads_{forward<INIT> (alloInit)...}
|
||||
NodeBuilder (StrView nodeSymbol, INIT&& ...alloInit)
|
||||
: symbol_{nodeSymbol}
|
||||
, leads_{forward<INIT> (alloInit)...}
|
||||
{ }
|
||||
|
||||
template<class BUILD, uint siz, class D0>
|
||||
NodeBuilder (NodeBuilder<POL,D0>&& pred, SizMark<siz>, BUILD&& entryBuilder)
|
||||
: leads_{move (pred.leads_)}
|
||||
: symbol_{pred.symbol_}
|
||||
, leads_{move (pred.leads_)}
|
||||
, patternData_{move (pred.patternData_), forward<BUILD> (entryBuilder)}
|
||||
{ }
|
||||
|
||||
|
|
@ -207,7 +210,7 @@ namespace engine {
|
|||
withAllocator (INIT&& ...alloInit)
|
||||
{
|
||||
using AllocatorPolicy = lib::allo::SetupSeveral<ALO,INIT...>;
|
||||
return NodeBuilder<AllocatorPolicy>{forward<INIT>(alloInit)...};
|
||||
return NodeBuilder<AllocatorPolicy>{symbol_, forward<INIT>(alloInit)...};
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -247,7 +250,7 @@ namespace engine {
|
|||
/** setup standard wiring to adapt the given processing function.
|
||||
* @return a PortBuilder specialised to wrap the given \a FUN */
|
||||
template<typename FUN>
|
||||
auto invoke (Literal qualifier, FUN fun);
|
||||
auto invoke (StrView portSpec, FUN fun);
|
||||
|
||||
/** specify an `InvocationAdapter` to use explicitly. */
|
||||
template<class ADA, typename...ARGS>
|
||||
|
|
@ -375,9 +378,9 @@ namespace engine {
|
|||
|
||||
private:
|
||||
template<typename FUN>
|
||||
PortBuilder(_Par&& base, FUN&& fun, Literal qualifier)
|
||||
PortBuilder(_Par&& base, FUN&& fun, StrView portSpec)
|
||||
: _Par{move(base)}
|
||||
, weavingBuilder_{forward<FUN> (fun), qualifier, _Par::leads_.policyConnect()}
|
||||
, weavingBuilder_{forward<FUN> (fun), _Par::symbol_, portSpec, _Par::leads_.policyConnect()}
|
||||
, defaultPort_{_Par::patternData_.size()}
|
||||
{ }
|
||||
|
||||
|
|
@ -409,10 +412,10 @@ namespace engine {
|
|||
template<class POL, class DAT>
|
||||
template<typename FUN>
|
||||
auto
|
||||
PortBuilderRoot<POL,DAT>::invoke (Literal qualifier, FUN fun)
|
||||
PortBuilderRoot<POL,DAT>::invoke (StrView portSpec, FUN fun)
|
||||
{
|
||||
using WeavingBuilder_FUN = WeavingBuilder<POL, manifoldSiz<FUN>(), FUN>;
|
||||
return PortBuilder<POL,DAT, WeavingBuilder_FUN>{move(*this), move(fun), qualifier};
|
||||
return PortBuilder<POL,DAT, WeavingBuilder_FUN>{move(*this), move(fun), portSpec};
|
||||
}
|
||||
/*
|
||||
template<class POL>
|
||||
|
|
@ -431,9 +434,9 @@ namespace engine {
|
|||
* any further specifications and data elements.
|
||||
*/
|
||||
inline auto
|
||||
prepareNode()
|
||||
prepareNode (StrView nodeSymbol)
|
||||
{
|
||||
return NodeBuilder<UseHeapAlloc>{};
|
||||
return NodeBuilder<UseHeapAlloc>{nodeSymbol};
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,12 +53,20 @@ namespace engine {
|
|||
|
||||
using lib::HashVal;
|
||||
using std::string;
|
||||
using StrView = std::string_view;
|
||||
|
||||
|
||||
class ProcID
|
||||
{
|
||||
string nodeSymb_;
|
||||
string portQual_;
|
||||
string argLists_;
|
||||
|
||||
ProcID (StrView nodeSymb, StrView portQual, StrView argLists);
|
||||
|
||||
public:
|
||||
/** build and register a processing ID descriptor */
|
||||
static ProcID& describe();
|
||||
static ProcID& describe (StrView nodeSymb, StrView portSpec);
|
||||
|
||||
/* === symbolic descriptors === */
|
||||
|
||||
|
|
@ -68,7 +76,17 @@ namespace engine {
|
|||
return "Lalü";
|
||||
}
|
||||
|
||||
friend bool operator== (ProcID const& l, ProcID const& r) { return true; }
|
||||
friend bool
|
||||
operator== (ProcID const& l, ProcID const& r)
|
||||
{
|
||||
return l.nodeSymb_ == r.nodeSymb_
|
||||
and l.portQual_ == r.portQual_
|
||||
and l.argLists_ == r.argLists_;
|
||||
}
|
||||
|
||||
friend bool
|
||||
operator!= (ProcID const& l, ProcID const& r)
|
||||
{ return not (l == r); }
|
||||
};
|
||||
|
||||
HashVal hash_value (ProcID const&);
|
||||
|
|
|
|||
|
|
@ -33,8 +33,10 @@
|
|||
#include "lib/format-string.hpp"
|
||||
#include "lib/util.hpp"
|
||||
|
||||
#include <boost/functional/hash.hpp>
|
||||
#include <unordered_set>
|
||||
|
||||
|
||||
namespace steam {
|
||||
namespace engine {
|
||||
|
||||
|
|
@ -58,13 +60,18 @@ namespace engine {
|
|||
* and retained until end of the Lumiera process (never deleted).
|
||||
*/
|
||||
ProcID&
|
||||
ProcID::describe()
|
||||
ProcID::describe (StrView nodeSymb, StrView portSpec)
|
||||
{
|
||||
auto res = procRegistry.emplace ();
|
||||
auto res = procRegistry.insert (ProcID{"bla","blubb","murks"});
|
||||
return unConst (*res.first);
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
ProcID::ProcID (StrView nodeSymb, StrView portQual, StrView argLists)
|
||||
: nodeSymb_{nodeSymb} /////////////////////////////////////////////////////////OOO intern these strings!!
|
||||
, portQual_{portQual}
|
||||
, argLists_{argLists}
|
||||
{ }
|
||||
|
||||
/** generate registry hash value based on the distinct data in ProcID.
|
||||
* This function is intended to be picked up by ADL, and should be usable
|
||||
|
|
|
|||
|
|
@ -122,12 +122,14 @@
|
|||
#include <functional>
|
||||
//#include <array>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace steam {
|
||||
namespace engine {
|
||||
namespace err = lumiera::error;
|
||||
|
||||
using StrView = std::string_view;
|
||||
using std::forward;
|
||||
using lib::Literal;
|
||||
using lib::Several;
|
||||
|
|
@ -379,13 +381,15 @@ namespace engine {
|
|||
|
||||
Depend<EngineCtx> ctx;
|
||||
|
||||
Literal qualifier_;
|
||||
StrView nodeSymb_;
|
||||
StrView portSpec_;
|
||||
FUN fun_;
|
||||
|
||||
template<typename...INIT>
|
||||
WeavingBuilder(FUN&& init, Literal qual, INIT&& ...alloInit)
|
||||
WeavingBuilder(FUN&& init, StrView nodeSymb, StrView portSpec, INIT&& ...alloInit)
|
||||
: leadPorts{forward<INIT> (alloInit)...}
|
||||
, qualifier_{qual}
|
||||
, nodeSymb_{nodeSymb}
|
||||
, portSpec_{portSpec}
|
||||
, fun_{move(init)}
|
||||
{ }
|
||||
|
||||
|
|
@ -476,10 +480,11 @@ namespace engine {
|
|||
,types = move(outTypes.build())
|
||||
,procFun = move(fun_)
|
||||
,resultIdx = resultSlot
|
||||
,procID = ProcID::describe (nodeSymb_,portSpec_)
|
||||
]
|
||||
(PortDataBuilder& portData) mutable -> void
|
||||
{
|
||||
portData.template emplace<TurnoutWeaving> (ProcID::describe()
|
||||
portData.template emplace<TurnoutWeaving> (procID
|
||||
,move(leads)
|
||||
,move(types)
|
||||
,resultIdx
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ namespace test {
|
|||
void
|
||||
build_connected_nodes()
|
||||
{
|
||||
auto con = prepareNode()
|
||||
auto con = prepareNode("Test:Src")
|
||||
.preparePort()
|
||||
.invoke(DUMMY_FUN_ID, dummyOp)
|
||||
.completePort()
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace test {
|
|||
} // (End) hidden impl details
|
||||
|
||||
|
||||
Literal DUMMY_FUN_ID{"DummyFun"};
|
||||
const string DUMMY_FUN_ID{"DummyFun"};
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -30,23 +30,23 @@
|
|||
|
||||
|
||||
#include "lib/error.hpp"
|
||||
#include "lib/symbol.hpp"
|
||||
#include "steam/engine/testframe.hpp"
|
||||
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace steam {
|
||||
namespace engine{
|
||||
namespace test {
|
||||
|
||||
using lib::Literal;
|
||||
using std::string;
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1367 : Dummy / Placeholder
|
||||
using NoArg = std::array<char*, 0>;
|
||||
using SoloArg = std::array<char*, 1>;
|
||||
|
||||
extern Literal DUMMY_FUN_ID;
|
||||
extern const string DUMMY_FUN_ID;
|
||||
|
||||
/** @todo a placeholder operation to wire a prototypical render node
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -13597,9 +13597,7 @@
|
|||
</node>
|
||||
<node CREATED="1522807024217" ID="ID_704863615" MODIFIED="1522807052394">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
für <i>LocationSolver</i>
|
||||
|
|
@ -13965,9 +13963,7 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
<node BACKGROUND_COLOR="#efedc4" CREATED="1518213086862" FOLDED="true" ID="ID_1713281564" MODIFIED="1561827469156" STYLE="bubble">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
not empty? UND
|
||||
|
|
@ -14865,9 +14861,7 @@
|
|||
</node>
|
||||
<node CREATED="1509143542611" ID="ID_114168871" MODIFIED="1576282358113" TEXT="Schwein gehabt, rekursiv programmiert">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...und ich hab mir letzte Woche noch solche Vorwürfe gemacht,
|
||||
|
|
@ -16500,9 +16494,7 @@
|
|||
</node>
|
||||
<node CREATED="1539294594367" ID="ID_451112886" MODIFIED="1576282358106" TEXT="wenn InteractionDirector selber ein Diff empfängt...">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...welches in eine Kind-Timeline absteigt,
|
||||
|
|
@ -19105,9 +19097,7 @@
|
|||
</node>
|
||||
<node COLOR="#33565a" CREATED="1664726003283" ID="ID_1754814316" MODIFIED="1664727540443" TEXT="show(Menu)? Nein ⟹ ▣">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
auch hier mehrstufige Prüfung mit Hysterese...
|
||||
|
|
@ -47272,9 +47262,7 @@
|
|||
</node>
|
||||
<node CREATED="1455668935142" ID="ID_1274632216" MODIFIED="1575133324202">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
muß DiffApplicationStrategy
|
||||
|
|
@ -47954,9 +47942,7 @@
|
|||
<node CREATED="1457190320444" ID="ID_1835423331" MODIFIED="1512926191933" TEXT="place into provided buffer">
|
||||
<node CREATED="1457190396170" ID="ID_275107868" MODIFIED="1457190419158">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
<i>throw </i>when
|
||||
|
|
@ -48327,9 +48313,7 @@
|
|||
</node>
|
||||
<node CREATED="1456424257381" ID="ID_740973686" MODIFIED="1575133328458" TEXT="introspektive Datenstruktur">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
dieser Ansatz löst tatsächlich das Problem,
|
||||
|
|
@ -48528,9 +48512,7 @@
|
|||
</node>
|
||||
<node CREATED="1456423661669" ID="ID_1064355256" MODIFIED="1575133328660" TEXT="Collections sind außen vor">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
...will sagen:
|
||||
|
|
@ -48917,9 +48899,7 @@
|
|||
<node CREATED="1448659026042" ID="ID_831434285" MODIFIED="1518487921087" TEXT="ein Schnittstellen-Paket"/>
|
||||
<node CREATED="1448669306480" ID="ID_1009169288" MODIFIED="1518487921087">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Problem: <b><font color="#8d02e1">InteractionControl</font></b>
|
||||
|
|
@ -90778,6 +90758,10 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1730678364459" ID="ID_208428537" MODIFIED="1730678519241" TEXT="Node-Symbol und Port-Spec durchschleifen">
|
||||
<arrowlink COLOR="#58858e" DESTINATION="ID_1890920364" ENDARROW="Default" ENDINCLINATION="-645;-1205;" ID="Arrow_ID_1530493323" STARTARROW="None" STARTINCLINATION="-445;27;"/>
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f8f1cb" COLOR="#a50125" CREATED="1728870929451" ID="ID_1740846481" MODIFIED="1728870951984" TEXT="der Gebrauch des BuffHandle::accessAs<TY>() ist zweifelhaft">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
|
|
@ -91615,8 +91599,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node CREATED="1729985279723" ID="ID_151767070" MODIFIED="1730487909948" TEXT="die IDs der Vorläufer gehen (geeignet) mit ein" VSHIFT="7"/>
|
||||
</node>
|
||||
<node CREATED="1730488249706" ID="ID_459312416" MODIFIED="1730488264756" TEXT="jeder Turnout trägt...">
|
||||
<node CREATED="1730488278894" ID="ID_1176414993" MODIFIED="1730488284466" TEXT="einen Qualifier">
|
||||
<node CREATED="1730488434602" ID="ID_598589955" MODIFIED="1730489528721" TEXT="möglicherweise eine Implementierungs-Variante">
|
||||
<node CREATED="1730488278894" ID="ID_1176414993" MODIFIED="1730678310374" TEXT="eine Port-Spec">
|
||||
<node CREATED="1730488434602" ID="ID_598589955" MODIFIED="1730678319292" TEXT="möglicherweise eine Implementierungs-Variante (Qualifier)">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
|
|
@ -91699,6 +91683,34 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#435e98" CREATED="1730678402026" ID="ID_1890920364" MODIFIED="1730678715497">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
Beschluß: als <b>string_view</b> durch den Builder durchreichen
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<linktarget COLOR="#58858e" DESTINATION="ID_1890920364" ENDARROW="Default" ENDINCLINATION="-645;-1205;" ID="Arrow_ID_1530493323" SOURCE="ID_208428537" STARTARROW="None" STARTINCLINATION="-445;27;"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1730678529981" ID="ID_1467777740" MODIFIED="1730678537808" TEXT="etwas riskant">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1730678539535" ID="ID_1546943312" MODIFIED="1730678688772" TEXT="Begründung: die Spec wird vermutlich in der Domain-Ontology zum Builder-Aufruf generiert">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
das heißt, es handelt sich definitiv nicht um Literal-Strings; zudem wollen wir die Spec ggfs. noch zerlegen und dann in eine Symbol-Table internen; insofern ist std::string_view der naheliegende Ansatz, da wir keine Inline-Storage durch x-fache Builder-Objekte durchschieben wollen, bloß um am Ende doch nur einen Teilstring in die Symboltabelle zu kopieren
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#f0d5c5" COLOR="#990033" CREATED="1730510962225" ID="ID_786613770" MODIFIED="1730563164682" TEXT="Metadaten-Zugriff / API">
|
||||
<linktarget COLOR="#47347f" DESTINATION="ID_786613770" ENDARROW="Default" ENDINCLINATION="-278;-1402;" ID="Arrow_ID_1689861408" SOURCE="ID_1257287659" STARTARROW="None" STARTINCLINATION="-284;14;"/>
|
||||
|
|
@ -91756,7 +91768,19 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1730598219853" ID="ID_241387326" MODIFIED="1730598252076" TEXT="ProcID ≙ separater Metadaten-Record">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1730598396950" ID="ID_1069190015" MODIFIED="1730598409561" TEXT="soll nur die semantisch relevanten Infos enthalten"/>
|
||||
<node CREATED="1730598414787" ID="ID_423504615" MODIFIED="1730598421854" TEXT="und zwar aufgebrochen in einzelne Felder"/>
|
||||
<node CREATED="1730598414787" ID="ID_423504615" MODIFIED="1730598421854" TEXT="und zwar aufgebrochen in einzelne Felder">
|
||||
<node CREATED="1730671842195" ID="ID_1856737391" MODIFIED="1730671853621" TEXT="Node-Symbol"/>
|
||||
<node CREATED="1730671855321" ID="ID_502887077" MODIFIED="1730671876673" TEXT="(optional) Port-Qualifier">
|
||||
<node CREATED="1730671993662" ID="ID_1245776322" MODIFIED="1730672015983" TEXT="der Builder gibt hier nur eine gesamt-Spec an"/>
|
||||
<node CREATED="1730672016907" ID="ID_93706594" MODIFIED="1730672032335" TEXT="diese kann man durch Parsen zerlegen (string_view verwenden!)"/>
|
||||
</node>
|
||||
<node CREATED="1730671878647" ID="ID_1725156830" MODIFIED="1730671882857" TEXT="Argumentlisten">
|
||||
<node CREATED="1730671902383" ID="ID_1628388377" MODIFIED="1730671911347" TEXT="vorerst mal in einem Satz speichern"/>
|
||||
<node COLOR="#5b280f" CREATED="1730671912849" ID="ID_1744582098" MODIFIED="1730671933132" TEXT="genaue Abwärung / Optimierung erst später möglich">
|
||||
<icon BUILTIN="hourglass"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1730598425648" ID="ID_1880777702" MODIFIED="1730598433445" TEXT="jedwede Connectivity wird errechnet">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
|
|
@ -91781,7 +91805,16 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node CREATED="1730669238465" ID="ID_645344682" MODIFIED="1730669259203" TEXT="sinnvollerweise auch die Teil-Strings ebenfalls in so eine Symboltabelle legen"/>
|
||||
<node CREATED="1730669238465" ID="ID_645344682" MODIFIED="1730671822014" TEXT="sinnvollerweise auch die Teil-Strings ebenfalls in so eine Symboltabelle legen">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
<body>
|
||||
<p>
|
||||
std::string hat ja inzwischen ebenfalls inline-Storage für ca. 20 Zeichen oder so; zudem könnte man in ProcID selber dann eine std::string_view darauf speichern, damit wäre der Zusammenhang effizient und klar dokumentiert
|
||||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
<node CREATED="1730669278148" ID="ID_98610288" MODIFIED="1730669343276" TEXT="Implementierung: unordered_set + hash_value(Elm const&)">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head/>
|
||||
|
|
@ -91793,8 +91826,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
und auch ansonsten äquivalent zur Implementierung von lib::Symbol
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</html></richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1730598272422" ID="ID_74408441" MODIFIED="1730669177907" TEXT="keine Bereinigung vorsehen">
|
||||
|
|
@ -91805,8 +91837,7 @@ Date:   Thu Apr 20 18:53:17 2023 +0200<br/>
|
|||
Ich sehe das als einen Laufzeit-Cache, der jederzeit regeneriert werden kann; er wird sich maximal mit den im Model verwendeten Processing-Funktions-Deskriptoren füllen
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</html></richcontent>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
|
|
@ -138403,6 +138434,13 @@ class Something
|
|||
<node CREATED="1710977317941" ID="ID_1453026433" MODIFIED="1710977322814" TEXT="std::string_view">
|
||||
<node CREATED="1710977334174" ID="ID_1310001368" MODIFIED="1710977350088" TEXT="ist eine read-only-View in ein char-Array"/>
|
||||
<node CREATED="1710977354168" ID="ID_184856921" MODIFIED="1710977365523" TEXT="ist explizit für Performance-Optimierung gedacht"/>
|
||||
<node CREATED="1730674064707" ID="ID_1077186889" MODIFIED="1730674070510" TEXT="Zugang und Verwendung">
|
||||
<node CREATED="1730674171956" ID="ID_110434712" MODIFIED="1730674192868" TEXT="kann direkt konstruieren aus char* + Länge"/>
|
||||
<node CREATED="1730674071930" ID="ID_293864510" MODIFIED="1730674100553" TEXT="std::string hat einen impliziten konversions-Operator ⟼ string_view"/>
|
||||
<node CREATED="1730674103205" ID="ID_1640631301" MODIFIED="1730674161176" TEXT="std::string hat einen expliziten konversions-Konstruktor ⟻ string_view">
|
||||
<arrowlink DESTINATION="ID_180009098" ENDARROW="Default" ENDINCLINATION="-22;-23;" ID="Arrow_ID_1857609798" STARTARROW="None" STARTINCLINATION="-123;5;"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#e0ceaa" COLOR="#690f14" CREATED="1710977367862" ID="ID_860112408" MODIFIED="1710986482731" TEXT="Gefahren">
|
||||
<linktarget COLOR="#7b415c" DESTINATION="ID_860112408" ENDARROW="Default" ENDINCLINATION="-3082;815;" ID="Arrow_ID_1628394674" SOURCE="ID_359874280" STARTARROW="None" STARTINCLINATION="-1036;64;"/>
|
||||
<node CREATED="1710977372915" ID="ID_1575898732" MODIFIED="1710977488625" TEXT="dangling references">
|
||||
|
|
@ -138419,6 +138457,7 @@ class Something
|
|||
</p>
|
||||
</body>
|
||||
</html></richcontent>
|
||||
<linktarget COLOR="#a9b4c1" DESTINATION="ID_180009098" ENDARROW="Default" ENDINCLINATION="-22;-23;" ID="Arrow_ID_1857609798" SOURCE="ID_1640631301" STARTARROW="None" STARTINCLINATION="-123;5;"/>
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1710977502025" ID="ID_766667745" MODIFIED="1710977510502" TEXT="deshalb ist diese Konversion explizit"/>
|
||||
<node CREATED="1710977511069" ID="ID_1874799796" MODIFIED="1710977520557" TEXT="(worüber sich viele Leute aufgeregt haben)"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue