|
Krita Source Code Documentation
|
#include <KisForest.h>
Inheritance diagram for KisForestDetail::DepthFirstIterator< T, visit_on, is_const >:Public Types | |
| using | NodeType = typename BaseIteratorType::NodeType |
| using | RootNodeType = typename BaseIteratorType::RootNodeType |
| using | traversal_state = TraversalState |
Public Member Functions | |
| DepthFirstIterator (NodeType *node, traversal_state state=traversal_state::Enter, bool shouldSkipToBegin=false) | |
| NodeType * | node () const |
| operator DepthFirstIterator< T, visit_on, true > () const | |
Private Types | |
| using | BaseClass |
| using | BaseIteratorType = typename DepthFirstIterator::base_type |
Private Member Functions | |
| void | increment () |
| void | skipToState (TraversalState state) |
Friends | |
| class | boost::iterator_core_access |
Depth-first iterator is used to traverse entire child-subtree of the node recursively in depth-first order. Every node is entered only once. It implements standard recursion iteration:
DepthFirstIterator<T, Enter> implements head-recursion, that is, the node is visited before its childrenDepthFirstIterator<T, Leave> implements tail-recursion, that is, the node is visited after its childrenUse subtreeBegin() and subtreeEnd() for head-recursion and tailSubtreeBegin() and tailSubtreeEnd() for tail-recursion.
Iterator models ForwardIterator concept.
WARNING: converting end() iterator to other iterator types currently leads to undefined behavior.
Definition at line 631 of file KisForest.h.
|
private |
Definition at line 638 of file KisForest.h.
|
private |
Definition at line 644 of file KisForest.h.
| using KisForestDetail::DepthFirstIterator< T, visit_on, is_const >::NodeType = typename BaseIteratorType::NodeType |
Definition at line 649 of file KisForest.h.
| using KisForestDetail::DepthFirstIterator< T, visit_on, is_const >::RootNodeType = typename BaseIteratorType::RootNodeType |
Definition at line 648 of file KisForest.h.
| using KisForestDetail::DepthFirstIterator< T, visit_on, is_const >::traversal_state = TraversalState |
Definition at line 647 of file KisForest.h.
|
inline |
Definition at line 651 of file KisForest.h.
References KisForestDetail::DepthFirstIterator< T, visit_on, is_const >::skipToState().
|
inlineprivate |
Definition at line 672 of file KisForest.h.
References KisForestDetail::DepthFirstIterator< T, visit_on, is_const >::skipToState().
|
inline |
Definition at line 661 of file KisForest.h.
|
inline |
Definition at line 665 of file KisForest.h.
|
inlineprivate |
Definition at line 677 of file KisForest.h.
References KisForestDetail::DepthFirstIterator< T, visit_on, is_const >::node().
|
friend |
Definition at line 670 of file KisForest.h.