diff --git a/src/gui/interact/ui-coord-resolver.cpp b/src/gui/interact/ui-coord-resolver.cpp index 99d1da0bc..b31697416 100644 --- a/src/gui/interact/ui-coord-resolver.cpp +++ b/src/gui/interact/ui-coord-resolver.cpp @@ -30,13 +30,15 @@ #include "gui/interact/ui-coord-resolver.hpp" //#include "gui/ctrl/global-ctx.hpp" -#include "lib/iter-stack.hpp" //#include "lib/symbol.hpp" //#include "lib/util.hpp" +#include + //using util::cStr; //using util::isnil; using lib::Symbol; +using lib::treeExplore; namespace gui { @@ -49,16 +51,36 @@ namespace interact { - /** @internal working data for path resolution */ - struct UICoordResolver::ResolutionState - { - using ChildIter = LocationQuery::ChildIter; - - lib::IterStack backlog; - lib::IterQueue solutions; - }; namespace { // + + class PathManipulator + : public UICoord + { + size_t currDepth_; + + public: + PathManipulator () + : UICoord{} + , currDepth_{0} + { } + // inherited copy operations + + UICoord const + retrieveResult() + { + UNIMPLEMENTED ("truncate to currDepth_"); + PathArray::normalise(); + return *this; + } + + void + setAt (size_t depth, Literal newSpec) + { + UNIMPLEMENTED ("forcibly set content, ensure storage"); + currDepth_ = depth; + } + }; }//(End) implementation details @@ -77,7 +99,40 @@ namespace interact { bool UICoordResolver::pathResolution() { - return false; ////////////////////////TODO WIP + size_t maxDepth = 0; + PathManipulator coverage; + auto searchAlgo = query_.getChildren (this->uic_, 0) + .expandOnIteration() + .filter([&](auto& iter) + { + size_t depth = iter.depth(); + Literal elm = uic_[depth]; + coverage.setAt (depth,elm); + iter.expandChildren(); + UNIMPLEMENTED ("bollocks"); + return true; + }) + .filter([&](auto& iter) + { + if (iter.depth() <= maxDepth) + return false; + maxDepth = iter.depth(); + return true; + }) + .transform([&](auto&) + { + return coverage.retrieveResult(); + }); + if (isnil (searchAlgo)) + return false; + + while (searchAlgo) + if (not res_.covfefe) + res_.covfefe.reset (new UICoord{*searchAlgo}); + else + *res_.covfefe = *searchAlgo; + + return true; } diff --git a/src/gui/interact/ui-coord-resolver.hpp b/src/gui/interact/ui-coord-resolver.hpp index 065585fbd..5d288c51a 100644 --- a/src/gui/interact/ui-coord-resolver.hpp +++ b/src/gui/interact/ui-coord-resolver.hpp @@ -197,15 +197,13 @@ namespace interact { { const char* anchor = nullptr; size_t depth = 0; - unique_ptr covfefe; + unique_ptr covfefe{}; bool isResolved = false; }; LocationQuery& query_; Resolution res_; - struct ResolutionState; - public: UICoordResolver (UICoord const& uic, LocationQuery& queryAPI) : Builder{uic} diff --git a/src/gui/interact/ui-coord.hpp b/src/gui/interact/ui-coord.hpp index 4be04e47d..a24aeeccb 100644 --- a/src/gui/interact/ui-coord.hpp +++ b/src/gui/interact/ui-coord.hpp @@ -622,7 +622,7 @@ namespace interact { return window (UIC_FIRST_WINDOW); } - /** @return aBuilder with just the windowID defined */ + /** @return a Builder with just the windowID defined */ inline UICoord::Builder UICoord::window (Literal windowID) { diff --git a/src/lib/iter-tree-explorer.hpp b/src/lib/iter-tree-explorer.hpp index b14bc9330..ee13e9d16 100644 --- a/src/lib/iter-tree-explorer.hpp +++ b/src/lib/iter-tree-explorer.hpp @@ -1178,7 +1178,7 @@ namespace lib { * expandChildren() and iterNext() calls and redirects appropriately. * @warning expandAll and expandOnIteration are not meant to be used at the same time. * Recommendation is to use expandOnIteration() right above (after) the expand() - * definition, since interplay with intermingled layers can be complex + * definition, since interplay with intermingled layers can be complex. */ auto expandOnIteration() diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 46e254837..47a995d4e 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -762,7 +762,7 @@ - + @@ -5218,7 +5218,7 @@ - + @@ -5843,7 +5843,7 @@ - + @@ -6839,7 +6839,7 @@ - + @@ -8356,7 +8356,7 @@ - + @@ -8367,13 +8367,24 @@ - + - - + + + + + + +

+ ist keine Lösung +

+ + +
+
@@ -8381,6 +8392,67 @@ + + + + + + +

+ ist partielle Lösung +

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

+ Ergebnis-Ausgabe ist die jeweilige mögliche Coverage +

+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8433,7 +8505,8 @@ - + + @@ -8460,11 +8533,14 @@ - + - - + + + + + @@ -8477,7 +8553,75 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
  • + die Standard-Implementierung von std::swap macht einen Dreiecks-Move +
  • +
  • + wir haben effiziente Move-Konstruktoren +
  • +
+ + +
+
+ + + + + + + + +
+ @@ -18665,7 +18809,7 @@ - +