Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
TreeStructureNavigator Class Referenceabstract

#include "stage/interact/ui-coord-resolver.hpp"

Description

Interface to locate and move within a tree shaped structure.

The actual nature of this structure is to be kept abstracted through this interface. The purpose of this construct is to build evaluations and matching operations on top.

Definition at line 140 of file ui-coord-resolver.hpp.

Static Public Member Functions

static auto buildIterator (TreeStructureNavigator *source)
 build a Lumiera Forward Iterator as front-end and managing Handle for a TreeStructureNavigator or subclass.
 
- Static Public Member Functions inherited from IterSource< Literal >
static iterator build (IterSource &sourceImpl)
 build an iterator frontend for the given source,
 
static iterator build (IterSource *sourceImplObject)
 build an iterator frontend, thereby managing the given heap allocated source object instance.
 

Public Member Functions

virtual ~TreeStructureNavigator ()
 this is an interface
 
virtual TreeStructureNavigatorexpandChildren () const =0
 expand into exploration of child elements at "current position".
 
- Public Member Functions inherited from IterSource< Literal >
virtual ~IterSource ()
 
virtual operator string () const
 is ABC
 

Additional Inherited Members

- Public Types inherited from IterSource< Literal >
using value_type = Literal
 
using reference = Literal &
 
using pointer = Literal *
 
- Static Public Attributes inherited from IterSource< Literal >
static iterator EMPTY_SOURCE
 storage for the empty data-source constant
 
- Protected Types inherited from IterSource< Literal >
using Pos = Literal *
 
using DataHandle = shared_ptr< IterSource >
 
- Protected Member Functions inherited from IterSource< Literal >
virtual Pos firstResult ()=0
 iteration start: prepare the first element.
 
virtual void nextResult (Pos &pos)=0
 iteration step: switch on to the next element.
 
virtual void disconnect ()
 disconnect the data source / iteration frontend.
 

Constructor & Destructor Documentation

◆ ~TreeStructureNavigator()

~TreeStructureNavigator ( )
virtual

this is an interface

Definition at line 33 of file ui-coord-resolver.cpp.

Member Function Documentation

◆ expandChildren()

virtual TreeStructureNavigator * expandChildren ( ) const
pure virtual

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"_.

Returns
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()

Referenced by TreeStructureNavigator::buildIterator().

+ Here is the caller graph for this function:

◆ buildIterator()

static auto buildIterator ( TreeStructureNavigator source)
inlinestatic

build a Lumiera Forward Iterator as front-end and managing Handle for a TreeStructureNavigator or subclass.

The provided pointer is assumed to point to heap allocated storage.

Returns
copyable iterator front-end handle, which allows to retrieve once all values yielded by this IterSource. The front-end takes ownership of the given object.
Note
the generated iterator is preconfigured to allow for _"child expansion"_, thereby calling through the virtual API function expandChildren()

Definition at line 169 of file ui-coord-resolver.hpp.

References TreeStructureNavigator::expandChildren(), and lib::explore().

Referenced by GenNodeLocationQuery::getChildren().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
+ Inheritance diagram for TreeStructureNavigator:
+ Collaboration diagram for TreeStructureNavigator:

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