LibOFX
tree< T, tree_node_allocator >::post_order_iterator Class Reference

Depth-first iterator, first accessing the children, then the node itself. More...

#include <tree.hh>

Inheritance diagram for tree< T, tree_node_allocator >::post_order_iterator:
tree< T, tree_node_allocator >::iterator_base

Public Member Functions

 post_order_iterator (tree_node *)
 post_order_iterator (const iterator_base &)
 post_order_iterator (const sibling_iterator &)
bool operator== (const post_order_iterator &) const
bool operator!= (const post_order_iterator &) const
post_order_iteratoroperator++ ()
post_order_iteratoroperator-- ()
post_order_iterator operator++ (int)
post_order_iterator operator-- (int)
post_order_iteratoroperator+= (unsigned int)
post_order_iteratoroperator-= (unsigned int)
void descend_all ()
 Set iterator to the first child as deep as possible down the tree.
Public Member Functions inherited from tree< T, tree_node_allocator >::iterator_base
 iterator_base (tree_node *)
T & operator* () const
T * operator-> () const
void skip_children ()
 When called, the next increment/decrement skips children of this node.
unsigned int number_of_children () const
 Number of children of the node pointed to by the iterator.
sibling_iterator begin () const
sibling_iterator end () const

Additional Inherited Members

Public Types inherited from tree< T, tree_node_allocator >::iterator_base
typedef T value_type
typedef T * pointer
typedef T & reference
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef std::bidirectional_iterator_tag iterator_category
Data Fields inherited from tree< T, tree_node_allocator >::iterator_base
tree_nodenode
Protected Attributes inherited from tree< T, tree_node_allocator >::iterator_base
bool skip_current_children_

Detailed Description

template<class T, class tree_node_allocator = std::allocator<tree_node_<T> >>
class tree< T, tree_node_allocator >::post_order_iterator

Depth-first iterator, first accessing the children, then the node itself.

Definition at line 181 of file tree.hh.

Constructor & Destructor Documentation

◆ post_order_iterator() [1/4]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator ( )

Definition at line 1794 of file tree.hh.

◆ post_order_iterator() [2/4]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator ( tree_node * tn)

Definition at line 1800 of file tree.hh.

◆ post_order_iterator() [3/4]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator ( const iterator_base & other)

Definition at line 1806 of file tree.hh.

◆ post_order_iterator() [4/4]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator ( const sibling_iterator & other)

Definition at line 1812 of file tree.hh.

Member Function Documentation

◆ descend_all()

template<class T, class tree_node_allocator>
void tree< T, tree_node_allocator >::post_order_iterator::descend_all ( )

Set iterator to the first child as deep as possible down the tree.

Definition at line 1909 of file tree.hh.

◆ operator!=()

template<class T, class tree_node_allocator>
bool tree< T, tree_node_allocator >::post_order_iterator::operator!= ( const post_order_iterator & other) const

Definition at line 1595 of file tree.hh.

◆ operator++() [1/2]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator++ ( )

Definition at line 1827 of file tree.hh.

◆ operator++() [2/2]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator tree< T, tree_node_allocator >::post_order_iterator::operator++ ( int )

Definition at line 1870 of file tree.hh.

◆ operator+=()

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator+= ( unsigned int num)

Definition at line 1887 of file tree.hh.

◆ operator--() [1/2]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator-- ( )

Definition at line 1852 of file tree.hh.

◆ operator--() [2/2]

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator tree< T, tree_node_allocator >::post_order_iterator::operator-- ( int )

Definition at line 1878 of file tree.hh.

◆ operator-=()

template<class T, class tree_node_allocator>
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator-= ( unsigned int num)

Definition at line 1898 of file tree.hh.

◆ operator==()

template<class T, class tree_node_allocator>
bool tree< T, tree_node_allocator >::post_order_iterator::operator== ( const post_order_iterator & other) const

Definition at line 1602 of file tree.hh.


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