|
Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
The iterator type over structure of the tree following preorder traversal. More...
#include <forward_tree.hpp>
Public Types | |
| using | difference_type = std::ptrdiff_t |
| using | value_type = T |
| using | pointer = const T * |
| using | reference = const T & |
| using | iterator_category = std::bidirectional_iterator_tag |
Public Member Functions | |
| const_prefix_iterator (const forward_tree *n) | |
| Constructor of the iterator based on the iterator to child list. More... | |
| const_prefix_iterator & | operator++ () |
| Advance the iterator. More... | |
| const_prefix_iterator | operator++ (int) |
| Advance the iterator. More... | |
| const_prefix_iterator & | operator-- () |
| Retract the iterator. More... | |
| const_prefix_iterator | operator-- (int) |
| Retract the iterator. More... | |
| bool | operator== (const const_prefix_iterator &other) const |
| Compare the iterators for equality. More... | |
| bool | operator!= (const const_prefix_iterator &other) const |
| Compare the iterators for nonequality. More... | |
| const T & | operator* () const |
| Dereference the iterator by accessing the pointed node value. More... | |
| const T * | operator-> () const |
| Dereference the iterator by accessing the pointed node value. More... | |
| size_t | getLevel () const |
| Retrieves what is the depth of node the iterator is pointing to. More... | |
Friends | |
| template<class F > | |
| class | forward_tree |
The iterator type over structure of the tree following preorder traversal.
The prefix iterator is constructed as a wrapper over structure iterator, it selects only non-virtual nodes.
| using ext::forward_tree< T >::const_prefix_iterator::difference_type = std::ptrdiff_t |
| using ext::forward_tree< T >::const_prefix_iterator::iterator_category = std::bidirectional_iterator_tag |
| using ext::forward_tree< T >::const_prefix_iterator::pointer = const T* |
| using ext::forward_tree< T >::const_prefix_iterator::reference = const T& |
| using ext::forward_tree< T >::const_prefix_iterator::value_type = T |
|
inline |
Constructor of the iterator based on the iterator to child list.
| n | the iterator to child list |
|
inline |
Retrieves what is the depth of node the iterator is pointing to.
|
inline |
Compare the iterators for nonequality.
| other | the other instance |
|
inline |
Dereference the iterator by accessing the pointed node value.
|
inline |
Advance the iterator.
|
inline |
Advance the iterator.
|
inline |
Retract the iterator.
|
inline |
Retract the iterator.
|
inline |
Dereference the iterator by accessing the pointed node value.
|
inline |
Compare the iterators for equality.
| other | the other instance |