#include <tree.h>
Definition at line 245 of file tree.h.
Public Member Functions | |
sibling_iterator () | |
sibling_iterator (tree_node *) | |
sibling_iterator (const sibling_iterator &) | |
sibling_iterator (const iterator_base &) | |
bool | operator== (const sibling_iterator &) const |
bool | operator!= (const sibling_iterator &) const |
sibling_iterator & | operator++ () |
sibling_iterator & | operator-- () |
sibling_iterator | operator++ (int) |
sibling_iterator | operator-- (int) |
sibling_iterator & | operator+= (unsigned int) |
sibling_iterator & | operator-= (unsigned int) |
tree_node * | range_first () const |
tree_node * | range_last () const |
Data Fields | |
tree_node * | parent_ |
Private Member Functions | |
void | set_parent_ () |
tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | ) | [inline] |
Definition at line 2415 of file tree.h.
References tree< T, tree_node_allocator >::sibling_iterator::set_parent_().
02416 : iterator_base() 02417 { 02418 set_parent_(); 02419 }
tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | tree_node * | tn | ) | [inline] |
Definition at line 2422 of file tree.h.
References tree< T, tree_node_allocator >::sibling_iterator::set_parent_().
02423 : iterator_base(tn) 02424 { 02425 set_parent_(); 02426 }
tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | const sibling_iterator & | other | ) | [inline] |
Definition at line 2436 of file tree.h.
02437 : iterator_base(other), parent_(other.parent_) 02438 { 02439 }
tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator | ( | const iterator_base & | other | ) | [inline] |
Definition at line 2429 of file tree.h.
References tree< T, tree_node_allocator >::sibling_iterator::set_parent_().
02430 : iterator_base(other.node) 02431 { 02432 set_parent_(); 02433 }
bool tree< T, tree_node_allocator >::sibling_iterator::operator== | ( | const sibling_iterator & | other | ) | const [inline] |
Definition at line 1858 of file tree.h.
References tree< T, tree_node_allocator >::iterator_base::node.
bool tree< T, tree_node_allocator >::sibling_iterator::operator!= | ( | const sibling_iterator & | other | ) | const [inline] |
Definition at line 1851 of file tree.h.
References tree< T, tree_node_allocator >::iterator_base::node.
tree< T, tree_node_allocator >::sibling_iterator & tree< T, tree_node_allocator >::sibling_iterator::operator++ | ( | ) | [inline] |
Definition at line 2451 of file tree.h.
References tree_node_< T >::next_sibling, and tree< T, tree_node_allocator >::iterator_base::node.
tree< T, tree_node_allocator >::sibling_iterator & tree< T, tree_node_allocator >::sibling_iterator::operator-- | ( | ) | [inline] |
Definition at line 2459 of file tree.h.
References tree_node_< T >::last_child, tree< T, tree_node_allocator >::iterator_base::node, tree< T, tree_node_allocator >::sibling_iterator::parent_, and tree_node_< T >::prev_sibling.
02460 { 02461 if(this->node) this->node=this->node->prev_sibling; 02462 else { 02463 assert(parent_); 02464 this->node=parent_->last_child; 02465 } 02466 return *this; 02467 }
tree< T, tree_node_allocator >::sibling_iterator tree< T, tree_node_allocator >::sibling_iterator::operator++ | ( | int | ) | [inline] |
Definition at line 2470 of file tree.h.
02471 { 02472 sibling_iterator copy = *this; 02473 ++(*this); 02474 return copy; 02475 }
tree< T, tree_node_allocator >::sibling_iterator tree< T, tree_node_allocator >::sibling_iterator::operator-- | ( | int | ) | [inline] |
Definition at line 2478 of file tree.h.
02479 { 02480 sibling_iterator copy = *this; 02481 --(*this); 02482 return copy; 02483 }
tree< T, tree_node_allocator >::sibling_iterator & tree< T, tree_node_allocator >::sibling_iterator::operator+= | ( | unsigned int | num | ) | [inline] |
tree< T, tree_node_allocator >::sibling_iterator & tree< T, tree_node_allocator >::sibling_iterator::operator-= | ( | unsigned int | num | ) | [inline] |
tree< T, tree_node_allocator >::tree_node * tree< T, tree_node_allocator >::sibling_iterator::range_first | ( | ) | const [inline] |
Definition at line 2506 of file tree.h.
References tree_node_< T >::first_child, and tree< T, tree_node_allocator >::sibling_iterator::parent_.
tree< T, tree_node_allocator >::tree_node * tree< T, tree_node_allocator >::sibling_iterator::range_last | ( | ) | const [inline] |
Definition at line 2513 of file tree.h.
References tree_node_< T >::last_child, and tree< T, tree_node_allocator >::sibling_iterator::parent_.
Referenced by tree< T, tree_node_allocator >::insert(), tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator(), tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator(), and tree< T, tree_node_allocator >::pre_order_iterator::pre_order_iterator().
02514 { 02515 return parent_->last_child; 02516 }
void tree< T, tree_node_allocator >::sibling_iterator::set_parent_ | ( | ) | [inline, private] |
Definition at line 2442 of file tree.h.
References tree< T, tree_node_allocator >::iterator_base::node, tree_node_< T >::parent, and tree< T, tree_node_allocator >::sibling_iterator::parent_.
Referenced by tree< T, tree_node_allocator >::sibling_iterator::sibling_iterator().
02443 { 02444 parent_=0; 02445 if(this->node==0) return; 02446 if(this->node->parent!=0) 02447 parent_=this->node->parent; 02448 }
tree_node* tree< T, tree_node_allocator >::sibling_iterator::parent_ |
Definition at line 263 of file tree.h.
Referenced by tree< T, tree_node_allocator >::iterator_base::begin(), tree< T, tree_node_allocator >::iterator_base::end(), tree< T, tree_node_allocator >::end(), tree< T, tree_node_allocator >::insert(), tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator(), tree< T, tree_node_allocator >::move_before(), tree< T, tree_node_allocator >::sibling_iterator::operator--(), tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator(), tree< T, tree_node_allocator >::pre_order_iterator::pre_order_iterator(), tree< T, tree_node_allocator >::sibling_iterator::range_first(), tree< T, tree_node_allocator >::sibling_iterator::range_last(), and tree< T, tree_node_allocator >::sibling_iterator::set_parent_().