LocationQuery: draft simple coverage check

ugly while loop....
maybe recursive?
This commit is contained in:
Fischlurch 2017-10-23 03:17:18 +02:00
parent 240459c550
commit 144cc97e1b

View file

@ -151,6 +151,18 @@ namespace interact {
{
return Symbol{lib::pull_last (tree_.keys())}; //////////////////////////////////////////////TICKET #1113 : warning use of Symbol table becomes obsolete when EntryID relies on Literal
}
static Rec const&
drillDown (Rec const& tree, UICoord const& path, size_t maxDepth, size_t& depth)
{
if (depth<maxDepth and path.isPresent(depth))
{
const char* pathElm = path[depth];
if (tree.hasAttribute(pathElm))
return drillDown (tree.get(pathElm).data.get<Rec>(), path, maxDepth, ++depth);
}
return tree;
}
};