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;
|
const char* anchor = nullptr;
|
||||||
size_t depth = 0;
|
size_t depth = 0;
|
||||||
std::unique_ptr<UICoord> covfefe;
|
std::unique_ptr<UICoord> covfefe;
|
||||||
bool isComplete = false;
|
bool isResolved = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ResolutionState
|
struct ResolutionState
|
||||||
|
|
@ -229,10 +229,18 @@ namespace interact {
|
||||||
|
|
||||||
|
|
||||||
private:
|
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
|
void
|
||||||
attempt_trivialResolution()
|
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 */
|
/** @internal algorithm to resolve this UICoord path against the actual UI topology */
|
||||||
|
|
|
||||||
|
|
@ -466,12 +466,9 @@ namespace interact {
|
||||||
|
|
||||||
class UICoord::Builder
|
class UICoord::Builder
|
||||||
{
|
{
|
||||||
|
protected:
|
||||||
UICoord uic_;
|
UICoord uic_;
|
||||||
|
|
||||||
/** builder instances created by UICoord */
|
|
||||||
friend class UICoord;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
template<typename...ARGS>
|
template<typename...ARGS>
|
||||||
explicit
|
explicit
|
||||||
Builder (ARGS&& ...args) : uic_{std::forward<ARGS> (args)...} { }
|
Builder (ARGS&& ...args) : uic_{std::forward<ARGS> (args)...} { }
|
||||||
|
|
@ -482,6 +479,9 @@ namespace interact {
|
||||||
Builder& operator= (Builder const&) = delete;
|
Builder& operator= (Builder const&) = delete;
|
||||||
Builder& operator= (Builder &&) = delete;
|
Builder& operator= (Builder &&) = delete;
|
||||||
|
|
||||||
|
/** builder instances created by UICoord */
|
||||||
|
friend class UICoord;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** @remark moving a builder instance is acceptable */
|
/** @remark moving a builder instance is acceptable */
|
||||||
Builder (Builder &&) = default;
|
Builder (Builder &&) = default;
|
||||||
|
|
|
||||||
|
|
@ -4480,6 +4480,23 @@
|
||||||
</node>
|
</node>
|
||||||
<node CREATED="1508539089208" ID="ID_1071949477" MODIFIED="1508539131769" TEXT="Query">
|
<node CREATED="1508539089208" ID="ID_1071949477" MODIFIED="1508539131769" TEXT="Query">
|
||||||
<icon BUILTIN="info"/>
|
<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">
|
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1508539108398" ID="ID_681619275" MODIFIED="1508539127755" TEXT="coverage">
|
||||||
<icon BUILTIN="flag-yellow"/>
|
<icon BUILTIN="flag-yellow"/>
|
||||||
<node CREATED="1508539968020" ID="ID_64225559" MODIFIED="1508539972951" TEXT="in: expliziter Pfad"/>
|
<node CREATED="1508539968020" ID="ID_64225559" MODIFIED="1508539972951" TEXT="in: expliziter Pfad"/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue