#include <tree.h>
Definition at line 179 of file tree.h.
Public Member Functions | |
post_order_iterator () | |
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_iterator & | operator++ () |
post_order_iterator & | operator-- () |
post_order_iterator | operator++ (int) |
post_order_iterator | operator-- (int) |
post_order_iterator & | operator+= (unsigned int) |
post_order_iterator & | operator-= (unsigned int) |
void | descend_all () |
Set iterator to the first child as deep as possible down the tree. |
tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator | ( | ) | [inline] |
tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator | ( | const iterator_base & | other | ) | [inline] |
tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator | ( | const sibling_iterator & | other | ) | [inline] |
Definition at line 2048 of file tree.h.
References tree< T, tree_node_allocator >::iterator_base::node, tree< T, tree_node_allocator >::sibling_iterator::parent_, tree< T, tree_node_allocator >::sibling_iterator::range_last(), and tree< T, tree_node_allocator >::iterator_base::skip_children().
02049 : iterator_base(other.node) 02050 { 02051 if(this->node==0) { 02052 if(other.range_last()!=0) 02053 this->node=other.range_last(); 02054 else 02055 this->node=other.parent_; 02056 this->skip_children(); 02057 ++(*this); 02058 } 02059 }
bool tree< T, tree_node_allocator >::post_order_iterator::operator== | ( | const post_order_iterator & | other | ) | const [inline] |
Definition at line 1830 of file tree.h.
References tree< T, tree_node_allocator >::iterator_base::node.
bool tree< T, tree_node_allocator >::post_order_iterator::operator!= | ( | const post_order_iterator & | other | ) | const [inline] |
Definition at line 1823 of file tree.h.
References tree< T, tree_node_allocator >::iterator_base::node.
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator++ | ( | ) | [inline] |
Definition at line 2062 of file tree.h.
References tree_node_< T >::first_child, tree_node_< T >::next_sibling, tree< T, tree_node_allocator >::iterator_base::node, tree_node_< T >::parent, and tree< T, tree_node_allocator >::iterator_base::skip_current_children_.
02063 { 02064 assert(this->node!=0); 02065 if(this->node->next_sibling==0) { 02066 this->node=this->node->parent; 02067 this->skip_current_children_=false; 02068 } 02069 else { 02070 this->node=this->node->next_sibling; 02071 if(this->skip_current_children_) { 02072 this->skip_current_children_=false; 02073 } 02074 else { 02075 while(this->node->first_child) 02076 this->node=this->node->first_child; 02077 } 02078 } 02079 return *this; 02080 }
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator-- | ( | ) | [inline] |
Definition at line 2083 of file tree.h.
References tree_node_< T >::last_child, tree< T, tree_node_allocator >::iterator_base::node, tree_node_< T >::parent, tree_node_< T >::prev_sibling, and tree< T, tree_node_allocator >::iterator_base::skip_current_children_.
02084 { 02085 assert(this->node!=0); 02086 if(this->skip_current_children_ || this->node->last_child==0) { 02087 this->skip_current_children_=false; 02088 while(this->node->prev_sibling==0) 02089 this->node=this->node->parent; 02090 this->node=this->node->prev_sibling; 02091 } 02092 else { 02093 this->node=this->node->last_child; 02094 } 02095 return *this; 02096 }
tree< T, tree_node_allocator >::post_order_iterator tree< T, tree_node_allocator >::post_order_iterator::operator++ | ( | int | ) | [inline] |
Definition at line 2099 of file tree.h.
02100 { 02101 post_order_iterator copy = *this; 02102 ++(*this); 02103 return copy; 02104 }
tree< T, tree_node_allocator >::post_order_iterator tree< T, tree_node_allocator >::post_order_iterator::operator-- | ( | int | ) | [inline] |
Definition at line 2107 of file tree.h.
02108 { 02109 post_order_iterator copy = *this; 02110 --(*this); 02111 return copy; 02112 }
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator+= | ( | unsigned int | num | ) | [inline] |
tree< T, tree_node_allocator >::post_order_iterator & tree< T, tree_node_allocator >::post_order_iterator::operator-= | ( | unsigned int | num | ) | [inline] |
void tree< T, tree_node_allocator >::post_order_iterator::descend_all | ( | ) | [inline] |
Set iterator to the first child as deep as possible down the tree.
Definition at line 2136 of file tree.h.
References tree_node_< T >::first_child, and tree< T, tree_node_allocator >::iterator_base::node.
02137 { 02138 assert(this->node!=0); 02139 while(this->node->first_child) 02140 this->node=this->node->first_child; 02141 }