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

Base class for iterators, only pointers stored, no traversal logic. More...

#include <tree.hh>

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

Public Types

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
 

Public Member Functions

 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_nodenode
 

Protected Attributes

bool skip_current_children_
 

Detailed Description

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

Base class for iterators, only pointers stored, no traversal logic.

Definition at line 131 of file tree.hh.

Member Typedef Documentation

◆ difference_type

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
typedef ptrdiff_t tree< T, tree_node_allocator >::iterator_base::difference_type

Definition at line 139 of file tree.hh.

◆ iterator_category

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
typedef std::bidirectional_iterator_tag tree< T, tree_node_allocator >::iterator_base::iterator_category

Definition at line 140 of file tree.hh.

◆ pointer

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
typedef T* tree< T, tree_node_allocator >::iterator_base::pointer

Definition at line 136 of file tree.hh.

◆ reference

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
typedef T& tree< T, tree_node_allocator >::iterator_base::reference

Definition at line 137 of file tree.hh.

◆ size_type

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
typedef size_t tree< T, tree_node_allocator >::iterator_base::size_type

Definition at line 138 of file tree.hh.

◆ value_type

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
typedef T tree< T, tree_node_allocator >::iterator_base::value_type

Definition at line 135 of file tree.hh.

Constructor & Destructor Documentation

◆ iterator_base() [1/2]

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

Definition at line 1571 of file tree.hh.

◆ iterator_base() [2/2]

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

Definition at line 1577 of file tree.hh.

Member Function Documentation

◆ begin()

template<class T , class tree_node_allocator >
tree< T, tree_node_allocator >::sibling_iterator tree< T, tree_node_allocator >::iterator_base::begin ( ) const

Definition at line 1637 of file tree.hh.

◆ end()

template<class T , class tree_node_allocator >
tree< T, tree_node_allocator >::sibling_iterator tree< T, tree_node_allocator >::iterator_base::end ( ) const

Definition at line 1645 of file tree.hh.

◆ number_of_children()

template<class T , class tree_node_allocator >
unsigned int tree< T, tree_node_allocator >::iterator_base::number_of_children ( ) const

Number of children of the node pointed to by the iterator.

Definition at line 1659 of file tree.hh.

◆ operator*()

template<class T , class tree_node_allocator >
T & tree< T, tree_node_allocator >::iterator_base::operator* ( ) const

Definition at line 1583 of file tree.hh.

◆ operator->()

template<class T , class tree_node_allocator >
T * tree< T, tree_node_allocator >::iterator_base::operator-> ( ) const

Definition at line 1589 of file tree.hh.

◆ skip_children()

template<class T , class tree_node_allocator >
void tree< T, tree_node_allocator >::iterator_base::skip_children ( )

When called, the next increment/decrement skips children of this node.

Definition at line 1653 of file tree.hh.

Field Documentation

◆ node

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
tree_node* tree< T, tree_node_allocator >::iterator_base::node

Definition at line 156 of file tree.hh.

◆ skip_current_children_

template<class T , class tree_node_allocator = std::allocator<tree_node_<T> >>
bool tree< T, tree_node_allocator >::iterator_base::skip_current_children_
protected

Definition at line 158 of file tree.hh.


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