Lumiera  0.pre.03
»edit your freedom«
GenNodeLocationQuery Class Reference

#include "/Werk/devel/lumi/tests/stage/gen-node-location-query.hpp"

Description

Test/Diagnostics: implementation of the LocationQuery-API based on a abstract topological structure given as Record<GenNode> ("GenNode tree").

Remarks
intended for verifying path resolution and navigation through unit tests

Definition at line 99 of file gen-node-location-query.hpp.

Public Member Functions

template<class REC >
 GenNodeLocationQuery (REC &&backingStructure)
 
virtual Literal determineAnchor (UICoord const &path) override
 resolve Anchor against GenNode tree
 
virtual size_t determineCoverage (UICoord const &path) override
 evaluate to what extent a UIcoord spec matches the structure given as GenNode tree
 
virtual ChildIter getChildren (UICoord const &path, size_t pos) override
 get the sequence of child IDs at a designated position in the backing GenNode tree
 
- Public Member Functions inherited from LocationQuery
virtual ~LocationQuery ()
 this is an interface
 

Classes

class  GenNodeNavigator
 Helper to navigate a tree topology represented as GenNode tree. More...
 

Private Member Functions

Rec const & drillDown (Rec const &tree, UICoord const &path, size_t maxDepth, size_t &depth)
 
Literal getCurrentWindow ()
 
Literal getFirstWindow ()
 
Literal resolveElm (UICoord const &path, size_t depth)
 

Static Private Member Functions

template<class IT >
static TreeStructureNavigatorbuildNavigator (Rec const &node, size_t depth, IT &&rawIterator)
 type rebinding helper to pick up the concrete child iterator type IT
 
static TreeStructureNavigatorchildNavigator (Rec const &node, size_t depth)
 
static Rec const & descendInto (Rec const &tree, size_t depth, const char *pathElm)
 within tree at level depth descend into the child element designated by pathElm
 
static bool hasNode (Rec const &tree, const char *pathElm, size_t depth)
 does the guiding tree contain the element as requested by the UICoord path? More...
 

Private Attributes

Rec tree_
 

Additional Inherited Members

- Public Types inherited from LocationQuery
using ChildIter = decltype(TreeStructureNavigator::buildIterator(0))
 
- Static Public Attributes inherited from LocationQuery
static lib::Depend< LocationQueryservice
 access point to global LocationQuery service implementation More...
 

Member Function Documentation

◆ hasNode()

static bool hasNode ( Rec const &  tree,
const char *  pathElm,
size_t  depth 
)
inlinestaticprivate

does the guiding tree contain the element as requested by the UICoord path?

Remarks
this function abstracts a special asymmetry of the tree representation: at level==UIC_PERSP (the second level), the perspective info is packed into the type meta attribute. This was done on purpose, to verify our design is able to handle such implementation intricacies, which we expect to encounter when navigating the widgets of a real-world UI toolkit set

Definition at line 201 of file gen-node-location-query.hpp.

◆ childNavigator()

static TreeStructureNavigator* childNavigator ( Rec const &  node,
size_t  depth 
)
inlinestaticprivate
Returns
a heap allocated object attached at "current tree position" while exposing the names of all child nodes through iteration

Definition at line 224 of file gen-node-location-query.hpp.

+ Inheritance diagram for GenNodeLocationQuery:
+ Collaboration diagram for GenNodeLocationQuery:

The documentation for this class was generated from the following file: