liborigin 2.0.0

Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
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:

## Public Types
typedef ptrdiff_t | difference_type
typedef std::bidirectional_iterator_tag | iterator_category
typedef T * | pointer
typedef T & | reference
typedef size_t | size_type
typedef T | value_type

## Public Member Functions
sibling_iterator | begin () const
sibling_iterator | end () const
| iterator_base ()
| iterator_base (tree_node *)
unsigned int | number_of_children () const
| Number of children of the node pointed to by the iterator. More...
T & | operator* () const
T * | operator-> () const
void | skip_children ()
| When called, the next increment/decrement skips children of this node. More...

## Public Attributes
tree_node * | node

## 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.

## 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

## ◆ 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

## ◆ pointer

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

typedef T* tree< T, tree_node_allocator >::iterator_base::pointer

## ◆ reference

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

typedef T& tree< T, tree_node_allocator >::iterator_base::reference

## ◆ 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

## ◆ 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

## Constructor & Destructor Documentation

## ◆ iterator_base() [1/2]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::iterator_base::iterator_base

## ◆ iterator_base() [2/2]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::iterator_base::iterator_base | ( | tree_node * | tn | ) |

## 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

References tree< T, tree_node_allocator >::end(), and tree< T, tree_node_allocator >::sibling_iterator::parent_.

Referenced by tree< T, tree_node_allocator >::merge(), and tree< T, tree_node_allocator >::sort().

## ◆ end()

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::sibling_iterator tree< T, tree_node_allocator >::iterator_base::end

References tree< T, tree_node_allocator >::sibling_iterator::parent_.

Referenced by tree< T, tree_node_allocator >::merge(), and tree< T, tree_node_allocator >::sort().

## ◆ number_of_children()

template<class T , class tree_node_allocator >

unsigned int tree< T, tree_node_allocator >::iterator_base::number_of_children

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

References tree_node_< T >::first_child, tree_node_< T >::last_child, and tree_node_< T >::next_sibling.

Referenced by tree< T, tree_node_allocator >::equal().

## ◆ operator*()

template<class T , class tree_node_allocator >

T & tree< T, tree_node_allocator >::iterator_base::operator*

## ◆ operator->()

template<class T , class tree_node_allocator >

T * tree< T, tree_node_allocator >::iterator_base::operator->

## ◆ 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.

Referenced by tree< T, tree_node_allocator >::copy_(), tree< T, tree_node_allocator >::post_order_iterator::post_order_iterator(), tree< T, tree_node_allocator >::pre_order_iterator::pre_order_iterator(), and tree< T, tree_node_allocator >::size().

## Member Data Documentation

## ◆ node

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

tree_node* tree< T, tree_node_allocator >::iterator_base::node

Referenced by tree< T, tree_node_allocator >::index(), 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 >::breadth_first_queued_iterator::operator!=(), tree< T, tree_node_allocator >::fixed_depth_iterator::operator!=(), tree< T, tree_node_allocator >::leaf_iterator::operator!=(), tree< T, tree_node_allocator >::post_order_iterator::operator!=(), tree< T, tree_node_allocator >::pre_order_iterator::operator!=(), tree< T, tree_node_allocator >::sibling_iterator::operator!=(), tree< T, tree_node_allocator >::iterator_base_less::operator()(), tree< T, tree_node_allocator >::breadth_first_queued_iterator::operator++(), tree< T, tree_node_allocator >::breadth_first_queued_iterator::operator==(), tree< T, tree_node_allocator >::fixed_depth_iterator::operator==(), tree< T, tree_node_allocator >::leaf_iterator::operator==(), tree< T, tree_node_allocator >::post_order_iterator::operator==(), tree< T, tree_node_allocator >::pre_order_iterator::operator==(), 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 >::reparent(), tree< T, tree_node_allocator >::replace(), tree< T, tree_node_allocator >::sort(), and tree< T, tree_node_allocator >::swap().

## ◆ 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

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

- /tmp/slackdce/slackrepo.5NA6jZ/build_liborigin/liborigin/tree.hh