diff --git a/src/steam/engine/proc-id.hpp b/src/steam/engine/proc-id.hpp index 5b5619c1d..f68ea9cf5 100644 --- a/src/steam/engine/proc-id.hpp +++ b/src/steam/engine/proc-id.hpp @@ -130,17 +130,20 @@ namespace engine { /* === symbolic descriptors === */ - string genProcName(); - string genProcSpec(); ///< render a descriptor for the operation (without predecessors) - string genQualifier(); - string genNodeName(); - string genNodeSymbol(); - string genNodeDomain(); - string genNodeSpec(Leads&); - string genSrcSpec (Leads&); ///< transitively enumerate all unique source nodes + string genProcName() const; + string genProcSpec() const; ///< render a descriptor for the operation (without predecessors) + string genQualifier() const; + string genNodeName() const; + string genNodeSymbol() const; + string genNodeDomain() const; + string genNodeSpec(Leads&) const; + string genSrcSpec (Leads&) const; ///< transitively enumerate all unique source nodes struct ArgModel; - ArgModel genArgModel(); + ArgModel genArgModel() const; + + bool hasManifoldPatt() const { return attrib_.manifold; } + bool hasProxyPatt() const { return attrib_.isProxy; } friend bool operator== (ProcID const& l, ProcID const& r) @@ -185,7 +188,7 @@ namespace engine { : iArg{move (iarg)} , oArg{move (oarg)} { } - friend ArgModel ProcID::genArgModel(); + friend ArgModel ProcID::genArgModel() const; }; diff --git a/src/steam/engine/proc-node.cpp b/src/steam/engine/proc-node.cpp index 32fd8cacc..8215eb84b 100644 --- a/src/steam/engine/proc-node.cpp +++ b/src/steam/engine/proc-node.cpp @@ -28,6 +28,10 @@ #include "lib/parse.hpp" #include "lib/util.hpp" +// used for a »backdoor access« in PortDiagnostic::srcPorts +#include "steam/engine/media-weaving-pattern.hpp" +#include "steam/engine/param-weaving-pattern.hpp" + #include /////////////////////////////////////////////////////TICKET #1391 is boost-hash the proper tool for this task? #include #include @@ -227,7 +231,7 @@ namespace engine { } string - ProcID::genProcName() + ProcID::genProcName() const { std::ostringstream buffer; buffer << genNodeSymbol() @@ -236,7 +240,7 @@ namespace engine { } string - ProcID::genProcSpec() + ProcID::genProcSpec() const { std::ostringstream buffer; buffer << nodeName_ @@ -246,13 +250,13 @@ namespace engine { } string - ProcID::genNodeName() + ProcID::genNodeName() const { return string{nodeName_}; } string - ProcID::genNodeSymbol() + ProcID::genNodeSymbol() const { auto p = nodeName_.find(':'); return p == string::npos? string{nodeName_} @@ -260,7 +264,7 @@ namespace engine { } string - ProcID::genNodeDomain() + ProcID::genNodeDomain() const { auto p = nodeName_.find(':'); return p == string::npos? string{} @@ -268,7 +272,7 @@ namespace engine { } string - ProcID::genQualifier() + ProcID::genQualifier() const { std::ostringstream buffer; if (not isnil(portQual_)) @@ -287,7 +291,7 @@ namespace engine { } string - ProcID::genNodeSpec (Leads& leads) + ProcID::genNodeSpec (Leads& leads) const { std::ostringstream buffer; buffer << nodeName_; @@ -304,7 +308,7 @@ namespace engine { } string - ProcID::genSrcSpec (Leads& leads) + ProcID::genSrcSpec (Leads& leads) const { return isnil(leads)? string{"-◎"} // no leads => starting point itself is a source node : "┉┉{" @@ -320,7 +324,7 @@ namespace engine { /** parse and dissect the argument specification */ ProcID::ArgModel - ProcID::genArgModel() + ProcID::genArgModel() const { auto argListSyntax = accept_bracket(accept_repeated(0,MAX_NODE_ARG, COMMA, specTermSyntax)); auto argSpecSyntax = accept(argListSyntax) @@ -382,10 +386,31 @@ namespace engine { } - lib::Several + namespace {// create a »backdoor access« into actual weaving-pattern instances + + using _DummyProc = void(&)(NullType*); + using _DummyProto = FeedPrototype<_DummyProc>; + using _DummyMediaWeaving = MediaWeavingPattern<_DummyProto>; + using _RecastMediaWeaving = _TurnoutDiagnostic<_DummyMediaWeaving>; + + lib::Several EMPTY_PRECURSORS; + } + + + /** + * Intrude into the Turnout and find out about source connectivity + */ + lib::Several const& PortDiagnostic::srcPorts() { - UNIMPLEMENTED ("intrude into the Turnout and find out about source connectivity"); + if (p_.procID.hasManifoldPatt()) + { + auto [leads,types] = _RecastMediaWeaving::accessInternal (p_); + return leads; + } +/////////////////////////////////////////////////OOO add branch here to support Proxy-patterns + else + return EMPTY_PRECURSORS; } /** diff --git a/src/steam/engine/proc-node.hpp b/src/steam/engine/proc-node.hpp index 634cd5955..02f13ad7c 100644 --- a/src/steam/engine/proc-node.hpp +++ b/src/steam/engine/proc-node.hpp @@ -306,7 +306,7 @@ namespace engine { : p_{thePort} { } - lib::Several srcPorts(); + lib::Several const& srcPorts(); bool isSrc() { return srcPorts().empty(); } diff --git a/src/steam/engine/turnout.hpp b/src/steam/engine/turnout.hpp index 2434273ad..33495b7ae 100644 --- a/src/steam/engine/turnout.hpp +++ b/src/steam/engine/turnout.hpp @@ -172,6 +172,13 @@ namespace engine { * the similar basic layout of weaving pattern templates to gain access * to some common infrastructure, notably the predecessor ports. */ + static auto + accessInternal (Port& port) + { // Note: deliberately static, not dynamic-cast + auto& internalView = static_cast<_TurnoutDiagnostic&> (port); + auto& weavingPattern = static_cast (internalView); + return _accessInternal(weavingPattern); + } }; diff --git a/tests/core/steam/engine/node-meta-test.cpp b/tests/core/steam/engine/node-meta-test.cpp index 5b224306d..beb64268a 100644 --- a/tests/core/steam/engine/node-meta-test.cpp +++ b/tests/core/steam/engine/node-meta-test.cpp @@ -109,7 +109,7 @@ namespace test { /** @test TODO aspects of node definition relevant for the ProcID - * @todo WIP 2/25 🔁 define ⟶ implement + * @todo WIP 2/25 🔁 define ⟶ 🔁 implement */ void verify_ID_properties() @@ -174,6 +174,16 @@ namespace test { .setParam(0.5) .completePort() .build()}; + + ///////////////////////////////////////////////////////TODO WIP + Port& p1 = watch(nM).ports()[0]; +SHOW_EXPR(p1.procID.genProcSpec()) + auto& p1src = watch(p1).srcPorts(); + Port& p1s1 = p1src[0]; + Port& p1s2 = p1src[1]; +SHOW_EXPR(p1s1.procID.genProcSpec()) +SHOW_EXPR(p1s2.procID.genProcSpec()) + ///////////////////////////////////////////////////////TODO WIP UNIMPLEMENTED ("verify connectivity"); } }; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 7d88700f7..9c7237e5b 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -94683,8 +94683,8 @@ Date:   Thu Apr 20 18:53:17 2023 +0200
- + @@ -105894,8 +105894,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) Extended Attributes sollen diverse anderweitige Beschränkungen auffangen

- - +
@@ -105905,8 +105904,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) Wenn ein komplexer Sachverhalt überhaupt erst erschlossen werden soll, durch das Aufbauen einer orientierenden Struktur, so muß ein Vorgriff gemacht werden, der leider nur in den seltensten Fällen der Sache adäquat ist. Infolgedessen ist man dann an untaugliche Strukturen gebunden, deren Reparatur zu kostspielig wäre. Stattdessen hilft man sich mit darüber gelegten Layern, die Metadaten und erweiterte Attribute als Ankerpunkt verwenden

- -
+
@@ -105917,8 +105915,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) Design-Paradoxon: das Design besonders relevanter Funktionalität ist selten adäquat

- - +
@@ -106110,8 +106107,7 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) zu entgehen....

- - +
@@ -106127,30 +106123,31 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) will ich dann doch auch noch haben...

- - +
- - + + - - + + + - + - + - + + @@ -106160,58 +106157,100 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) oder ein Trampolin? aber auf Basis welcher Laufzeit-Information?

- -
+
- + + + + +

+ Auf Stuktur-Kongruenz von Templates zurückführen +

+ +
+
- + - + + - - + + + - + + - + + - + + + - + + - + - + + + + + + + + + + + + + + + + + + + + + +

+ MediaWeavingPattern ⟵  Dummy-Funktion void(&)(NullType*) +

+ + +
+
@@ -106241,6 +106280,24 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension) + + + + + + + + + + + + + + + + + + @@ -106286,6 +106343,10 @@ StM_bind(Builder<R1> b1, Extension<R1,R2> extension)
+ + + +