Navigator: draft a navigation helper interface
...which also happens to include sibling and child iteration; this is an attempt to reconcile the inner contradictions of the design (we need both absolute flexibility for the type of each child level iterator yet we want just a single, generic iterator front-end)
This commit is contained in:
parent
1ca890d1b6
commit
77c5573c80
3 changed files with 40 additions and 13 deletions
|
|
@ -41,6 +41,13 @@ using lib::Symbol;
|
|||
namespace gui {
|
||||
namespace interact {
|
||||
|
||||
// emit typeinfo and VTables here....
|
||||
TreeStructureNavigator::~TreeStructureNavigator() { }
|
||||
|
||||
LocationQuery::~LocationQuery() { }
|
||||
|
||||
|
||||
|
||||
/** @internal working data for path resolution */
|
||||
struct UICoordResolver::ResolutionState
|
||||
{
|
||||
|
|
|
|||
|
|
@ -84,7 +84,21 @@ namespace interact {
|
|||
: public lib::IterSource<Literal>
|
||||
{
|
||||
public:
|
||||
virtual ~TreeStructureNavigator() { } ///< this is an interface
|
||||
virtual ~TreeStructureNavigator(); ///< this is an interface
|
||||
|
||||
/** expand into exploration of child elements at "current position".
|
||||
* At any point, a TreeStructureNavicator instance indicates and represents a position
|
||||
* within a tree-like structure. At the same time, it is part of a sequence of siblings,
|
||||
* which is accessible through iteration. This operation now allows to extend visitation
|
||||
* of siblings by consuming the current element and replacing it with the sequence of its
|
||||
* immediate child elements, exposing the first one as the _"current position"_.
|
||||
* @return pointer to a new heap allocated TreeStructureNavigator implementation, which
|
||||
* represents the sequence of children. The object `this` will not be affected.
|
||||
* @note it is the caller's responsibility to own and manage the generated navigator.
|
||||
* The typical (and recommended) way to achieve this is to rely on the embedded
|
||||
* type #iterator, which exposes an appropriately wired iterator::expandChildren()
|
||||
*/
|
||||
virtual TreeStructureNavigator* expandChildren() const =0;
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -101,7 +115,7 @@ namespace interact {
|
|||
class LocationQuery
|
||||
{
|
||||
public:
|
||||
virtual ~LocationQuery() { } ///< this is an interface
|
||||
virtual ~LocationQuery(); ///< this is an interface
|
||||
|
||||
using ChildIter = lib::IterSource<Literal>::iterator;
|
||||
|
||||
|
|
|
|||
|
|
@ -7578,8 +7578,8 @@
|
|||
<arrowlink COLOR="#585e9d" DESTINATION="ID_845080696" ENDARROW="Default" ENDINCLINATION="-101;761;" ID="Arrow_ID_402051988" STARTARROW="None" STARTINCLINATION="208;5;"/>
|
||||
</node>
|
||||
<node CREATED="1510941661615" ID="ID_463290050" MODIFIED="1510941665179" TEXT="verpackt in IterSource"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1513561602173" HGAP="180" ID="ID_760843174" MODIFIED="1513891530169" TEXT="Design" VSHIFT="29">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1513561602173" HGAP="180" ID="ID_760843174" MODIFIED="1513978303329" TEXT="Design" VSHIFT="29">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1513560607636" ID="ID_774099115" MODIFIED="1513561433218" TEXT="expand -- wie?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1513560618698" ID="ID_471382650" MODIFIED="1513560638771" TEXT="Brauche Navigations-Zustand"/>
|
||||
|
|
@ -7602,8 +7602,8 @@
|
|||
<node CREATED="1513561531383" ID="ID_442154302" MODIFIED="1513561547728" TEXT="Match-Algo muß start-Offset verwalten und draufschlagen"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1513561577840" HGAP="52" ID="ID_260039139" MODIFIED="1513891560341" TEXT="Struktur Navigations-Zustand" VSHIFT="13">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1513561577840" HGAP="52" ID="ID_260039139" MODIFIED="1513978305941" TEXT="Struktur Navigations-Zustand" VSHIFT="13">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1513561744004" ID="ID_937539446" MODIFIED="1513961543467" TEXT="hängt ab von relativ/absolut?">
|
||||
<arrowlink COLOR="#9493b7" DESTINATION="ID_1500554436" ENDARROW="Default" ENDINCLINATION="91;103;" ID="Arrow_ID_811314610" STARTARROW="None" STARTINCLINATION="-39;0;"/>
|
||||
<icon BUILTIN="help"/>
|
||||
|
|
@ -7622,7 +7622,7 @@
|
|||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1513562001015" ID="ID_1952968226" MODIFIED="1513562009098" TEXT="zuzüglich konkretem Kind-Iterator">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1513564476303" ID="ID_718816032" MODIFIED="1513564513155" TEXT="Problem: Typ">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1513564476303" FOLDED="true" ID="ID_718816032" MODIFIED="1513978342757" TEXT="Problem: Typ">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1513564486206" ID="ID_586028205" MODIFIED="1513564495520" TEXT="Typ ist nicht uniform"/>
|
||||
<node CREATED="1513564496228" ID="ID_559674728" MODIFIED="1513564503503" TEXT="wird erst hinter IterSource konform"/>
|
||||
|
|
@ -7684,7 +7684,7 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1513864109584" HGAP="58" ID="ID_363837528" MODIFIED="1513891495318" TEXT="gesucht ist...." VSHIFT="-10">
|
||||
<node CREATED="1513864109584" FOLDED="true" HGAP="58" ID="ID_363837528" MODIFIED="1513978344340" TEXT="gesucht ist...." VSHIFT="-10">
|
||||
<icon BUILTIN="info"/>
|
||||
<node CREATED="1513864121911" ID="ID_137778872" MODIFIED="1513864124330" TEXT="State-Core"/>
|
||||
<node CREATED="1513864125110" ID="ID_102689213" MODIFIED="1513864143872" TEXT="(node&, depth)">
|
||||
|
|
@ -7702,7 +7702,7 @@
|
|||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1513889026175" ID="ID_1644294386" MODIFIED="1513889040936" TEXT="Lösungs-Möglichkeiten">
|
||||
<node CREATED="1513889026175" ID="ID_1644294386" MODIFIED="1513978467119" TEXT="Lösungs-Möglichkeiten">
|
||||
<node CREATED="1513889102196" ID="ID_583394337" MODIFIED="1513890986515" TEXT="zweimal VTable">
|
||||
<linktarget COLOR="#3c6aa0" DESTINATION="ID_583394337" ENDARROW="Default" ENDINCLINATION="313;-25;" ID="Arrow_ID_387579532" SOURCE="ID_1469033836" STARTARROW="None" STARTINCLINATION="309;-7;"/>
|
||||
</node>
|
||||
|
|
@ -7729,7 +7729,7 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1513891620064" HGAP="-78" ID="ID_393488703" MODIFIED="1513891636119" TEXT="Diskussion" VSHIFT="10">
|
||||
<node CREATED="1513891620064" FOLDED="true" HGAP="-78" ID="ID_393488703" MODIFIED="1513978330695" TEXT="Diskussion" VSHIFT="10">
|
||||
<icon BUILTIN="forward"/>
|
||||
<node CREATED="1513891660578" ID="ID_1557026848" MODIFIED="1513891665718" TEXT="heterogener Baum">
|
||||
<node CREATED="1513891666641" ID="ID_84511927" MODIFIED="1513891673373" TEXT="erzwingt Abstraktion"/>
|
||||
|
|
@ -7917,7 +7917,7 @@
|
|||
<node CREATED="1513962370870" ID="ID_1858133966" MODIFIED="1513962394590" TEXT="in einen komplett generischen Iterator-Typ"/>
|
||||
<node CREATED="1513961696753" ID="ID_1159003711" MODIFIED="1513961771032" TEXT="unschön aber zukunftsweisend...">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node CREATED="1513961791716" ID="ID_996099359" MODIFIED="1513961923982" TEXT="zusätzliche Heap-Alloc für jedes Expand">
|
||||
<node CREATED="1513961791716" FOLDED="true" ID="ID_996099359" MODIFIED="1513978359858" TEXT="zusätzliche Heap-Alloc für jedes Expand">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
|
|
@ -8016,8 +8016,14 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1513962712192" ID="ID_357363842" MODIFIED="1513963083142" TEXT="festlegen, wo die VTable ist">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1513962712192" ID="ID_357363842" MODIFIED="1513978505393" TEXT="festlegen, wo die VTable ist">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node CREATED="1513978430367" ID="ID_616991569" MODIFIED="1513978446605" TEXT="Nav und Iter">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1513978427353" ID="ID_110999881" MODIFIED="1513978443627" TEXT="TreeStructureNavigator">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1513962765760" ID="ID_795911284" MODIFIED="1513963084358" TEXT="Demo-Impl mit GenNode-Tree">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue