Algorithms Library Toolkit
A toolkit for algorithms, especially for algorithms on formal languages
|
The iterator type over structure of the tree following postorder 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_postfix_iterator (const forward_tree *n) | |
Constructor of the iterator based on the iterator to child list. More... | |
const_postfix_iterator & | operator++ () |
Advances the iterator. More... | |
const_postfix_iterator | operator++ (int) |
Advances the iterator. More... | |
const_postfix_iterator & | operator-- () |
Retract the iterator. More... | |
const_postfix_iterator | operator-- (int) |
Retract the iterator. More... | |
bool | operator== (const const_postfix_iterator &other) const |
Compare the iterators for equality. More... | |
bool | operator!= (const const_postfix_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 postorder traversal.
The prefix iterator is constructed as a wrapper over structure iterator, it selects only virtual nodes.
using ext::forward_tree< T >::const_postfix_iterator::difference_type = std::ptrdiff_t |
using ext::forward_tree< T >::const_postfix_iterator::iterator_category = std::bidirectional_iterator_tag |
using ext::forward_tree< T >::const_postfix_iterator::pointer = const T* |
using ext::forward_tree< T >::const_postfix_iterator::reference = const T& |
using ext::forward_tree< T >::const_postfix_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 |
Advances the iterator.
|
inline |
Advances 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