Navigator: draft the trivial resolution case
...based on the abstract LocationQuery interface
This commit is contained in:
parent
78a9ae875b
commit
fd3777de54
3 changed files with 31 additions and 6 deletions
|
|
@ -138,7 +138,7 @@ namespace interact {
|
|||
const char* anchor = nullptr;
|
||||
size_t depth = 0;
|
||||
std::unique_ptr<UICoord> covfefe;
|
||||
bool isComplete = false;
|
||||
bool isResolved = false;
|
||||
};
|
||||
|
||||
struct ResolutionState
|
||||
|
|
@ -229,10 +229,18 @@ namespace interact {
|
|||
|
||||
|
||||
private:
|
||||
/** establish a trivial anchorage and coverage, if possible.
|
||||
* @note when the UICoord contains wildcards or is incomplete,
|
||||
* a full resolution with backtracking is necessary to
|
||||
* determine anchorage and coverage
|
||||
*/
|
||||
void
|
||||
attempt_trivialResolution()
|
||||
{
|
||||
UNIMPLEMENTED ("if possible, establish a trivial anchorage and coverage right away");
|
||||
if (not uic_.isExplicit()) return;
|
||||
res_.anchor = query_.determineAnchor (this->uic_);
|
||||
res_.depth = query_.determineCoverage(this->uic_);
|
||||
res_.isResolved = true;
|
||||
}
|
||||
|
||||
/** @internal algorithm to resolve this UICoord path against the actual UI topology */
|
||||
|
|
|
|||
|
|
@ -466,12 +466,9 @@ namespace interact {
|
|||
|
||||
class UICoord::Builder
|
||||
{
|
||||
protected:
|
||||
UICoord uic_;
|
||||
|
||||
/** builder instances created by UICoord */
|
||||
friend class UICoord;
|
||||
|
||||
protected:
|
||||
template<typename...ARGS>
|
||||
explicit
|
||||
Builder (ARGS&& ...args) : uic_{std::forward<ARGS> (args)...} { }
|
||||
|
|
@ -482,6 +479,9 @@ namespace interact {
|
|||
Builder& operator= (Builder const&) = delete;
|
||||
Builder& operator= (Builder &&) = delete;
|
||||
|
||||
/** builder instances created by UICoord */
|
||||
friend class UICoord;
|
||||
|
||||
public:
|
||||
/** @remark moving a builder instance is acceptable */
|
||||
Builder (Builder &&) = default;
|
||||
|
|
|
|||
|
|
@ -4480,6 +4480,23 @@
|
|||
</node>
|
||||
<node CREATED="1508539089208" ID="ID_1071949477" MODIFIED="1508539131769" TEXT="Query">
|
||||
<icon BUILTIN="info"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1508619321957" ID="ID_1269390045" MODIFIED="1508619327957" TEXT="anchor">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1508619329420" ID="ID_360997488" MODIFIED="1508619334447" TEXT="in: expliziter Pfad"/>
|
||||
<node CREATED="1508619335131" ID="ID_327874233" MODIFIED="1508619413280" TEXT="out: Anker-Literal">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
Zweck ist vor allem, meta-Specs wie firstWindow, currentWindow aufzulösen
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1508539108398" ID="ID_681619275" MODIFIED="1508539127755" TEXT="coverage">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1508539968020" ID="ID_64225559" MODIFIED="1508539972951" TEXT="in: expliziter Pfad"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue