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

Iterator which traverses only the nodes at a given depth from the root. More...

#include <tree.hh>

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

Public Member Functions

 fixed_depth_iterator (tree_node *)
 
 fixed_depth_iterator (const iterator_base &)
 
 fixed_depth_iterator (const sibling_iterator &)
 
 fixed_depth_iterator (const fixed_depth_iterator &)
 
bool operator== (const fixed_depth_iterator &) const
 
bool operator!= (const fixed_depth_iterator &) const
 
fixed_depth_iteratoroperator++ ()
 
fixed_depth_iteratoroperator-- ()
 
fixed_depth_iterator operator++ (int)
 
fixed_depth_iterator operator-- (int)
 
fixed_depth_iteratoroperator+= (unsigned int)
 
fixed_depth_iteratoroperator-= (unsigned int)
 
- 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
 

Data Fields

tree_nodefirst_parent_
 
- Data Fields inherited from tree< T, tree_node_allocator >::iterator_base
tree_nodenode
 

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
 
- 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 >::fixed_depth_iterator

Iterator which traverses only the nodes at a given depth from the root.

Definition at line 205 of file tree.hh.

Constructor & Destructor Documentation

◆ fixed_depth_iterator() [1/5]

template<class T , class tree_node_allocator >
tree< T, tree_node_allocator >::fixed_depth_iterator::fixed_depth_iterator

Definition at line 1919 of file tree.hh.

◆ fixed_depth_iterator() [2/5]

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

Definition at line 1926 of file tree.hh.

◆ fixed_depth_iterator() [3/5]

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

Definition at line 1933 of file tree.hh.

◆ fixed_depth_iterator() [4/5]

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

Definition at line 1940 of file tree.hh.

◆ fixed_depth_iterator() [5/5]

template<class T , class tree_node_allocator >
tree< T, tree_node_allocator >::fixed_depth_iterator::fixed_depth_iterator ( const fixed_depth_iterator other)

Definition at line 1947 of file tree.hh.

Member Function Documentation

◆ operator++() [1/2]

template<class T , class tree_node_allocator >
tree< T, tree_node_allocator >::fixed_depth_iterator & tree< T, tree_node_allocator >::fixed_depth_iterator::operator++

Definition at line 1979 of file tree.hh.

◆ operator++() [2/2]

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

Definition at line 2070 of file tree.hh.

◆ operator+=()

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

Definition at line 2097 of file tree.hh.

◆ operator--() [1/2]

template<class T , class tree_node_allocator >
tree< T, tree_node_allocator >::fixed_depth_iterator & tree< T, tree_node_allocator >::fixed_depth_iterator::operator--

Definition at line 2041 of file tree.hh.

◆ operator--() [2/2]

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

Definition at line 2078 of file tree.hh.

◆ operator-=()

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

Definition at line 2086 of file tree.hh.

Field Documentation

◆ first_parent_

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
tree_node* tree< T, tree_node_allocator >::fixed_depth_iterator::first_parent_

Definition at line 223 of file tree.hh.


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