TTreeIterator
Inheritance
Level | Ancestor | Description |
---|---|---|
1 | TObject | Ultimate ancestor in a class hierarchy |
2 | TIterator<TElement> | Abstract base class for facilities that allow iteration over elements of type TElement . |
3 | TTreeIterator |
Source
Iterator.Tree.pas (36)
Description
TTreeIterator<TElement>
requires a Parent
and a ChildIteratorFactory
.
The parent element is the root element of the iteration of the current subtree and this element will be returned first.
For descending into the children of an element ChildIteratorFactory
is used
to create an iterator for the children of the current parent element. The created iterator should only
return the direct children of the parent element. TTreeIterator<TElement>
will then
use the created child iterators to form a depth-first iteration of the entire tree
rooted at Parent
.
Fields
Scope | Visibility | Type | Name | Description |
---|---|---|---|---|
Instance | protected | TElement | Parent | |
Instance | protected | TTreeVerticalOrder | Order | |
Instance | protected | TTreeIteratorState | State | |
Instance | protected | TIterator<TElement> | ChildIterator | |
Instance | protected | TIterator<TElement> | ChildSubtreeIterator | |
Instance | protected | TChildIteratorFactory<TElement> | ChildIteratorFactory |
Methods
Scope | Visibility | Result | Name | Description |
---|---|---|---|---|
Instance | protected | TElement | GetCurrent() | |
Instance | protected | EnterCurrentChild(EndState: TTreeIteratorState) | ||
Instance | public | Create(Parent: TElement; Order: TTreeVerticalOrder; ChildIteratorFactory: TChildIteratorFactory<TElement>) | ||
Instance | public | Destroy() | ||
Instance | public | TBoolean | IsValid() | |
Instance | public | GotoNext() |