liborigin2: tree< T, tree_node_allocator >::leaf_iterator Class Reference

liborigin2 29/08/2011

Public Member Functions | Private Attributes | List of all members
tree< T, tree_node_allocator >::leaf_iterator Class Reference

Iterator which traverses only the leaves. More...

`#include <tree.hh>`

Inheritance diagram for tree< T, tree_node_allocator >::leaf_iterator:

## Public Member Functions
| leaf_iterator ()
| leaf_iterator (tree_node *, tree_node *top=0)
| leaf_iterator (const sibling_iterator &)
| leaf_iterator (const iterator_base &)
bool | operator!= (const leaf_iterator &) const
leaf_iterator & | operator++ ()
leaf_iterator | operator++ (int)
leaf_iterator & | operator+= (unsigned int)
leaf_iterator & | operator-- ()
leaf_iterator | operator-- (int)
leaf_iterator & | operator-= (unsigned int)
bool | operator== (const leaf_iterator &) const
Public Member Functions inherited from tree< T, tree_node_allocator >::iterator_base
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...
void | skip_children (bool skip)

## Private Attributes
tree_node * | top_node

## Additional Inherited Members
Public Types inherited from tree< T, tree_node_allocator >::iterator_base
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 Attributes inherited from tree< T, tree_node_allocator >::iterator_base
tree_node * | node
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 >::leaf_iterator

Iterator which traverses only the leaves.

## Constructor & Destructor Documentation

## ◆ leaf_iterator() [1/4]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator | ( |  | ) |

## ◆ leaf_iterator() [2/4]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator | ( | tree_node * | tn,
|  | tree_node * | top = `0`
| ) |  |

## ◆ leaf_iterator() [3/4]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator | ( | const sibling_iterator & | other | ) |

References tree< T, tree_node_allocator >::iterator_base::node, tree< T, tree_node_allocator >::sibling_iterator::parent_, and tree< T, tree_node_allocator >::sibling_iterator::range_last().

## ◆ leaf_iterator() [4/4]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator::leaf_iterator | ( | const iterator_base & | other | ) |

## Member Function Documentation

## ◆ operator!=()

template<class T , class tree_node_allocator >

bool tree< T, tree_node_allocator >::leaf_iterator::operator!= | ( | const leaf_iterator & | other | ) | const

References tree< T, tree_node_allocator >::iterator_base::node.

## ◆ operator++() [1/2]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator & tree< T, tree_node_allocator >::leaf_iterator::operator++ | ( |  | ) |

## ◆ operator++() [2/2]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator tree< T, tree_node_allocator >::leaf_iterator::operator++ | ( | int |  | ) |

## ◆ operator+=()

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator & tree< T, tree_node_allocator >::leaf_iterator::operator+= | ( | unsigned int | num | ) |

## ◆ operator--() [1/2]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator & tree< T, tree_node_allocator >::leaf_iterator::operator-- | ( |  | ) |

## ◆ operator--() [2/2]

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator tree< T, tree_node_allocator >::leaf_iterator::operator-- | ( | int |  | ) |

## ◆ operator-=()

template<class T , class tree_node_allocator >

tree< T, tree_node_allocator >::leaf_iterator & tree< T, tree_node_allocator >::leaf_iterator::operator-= | ( | unsigned int | num | ) |

## ◆ operator==()

template<class T , class tree_node_allocator >

bool tree< T, tree_node_allocator >::leaf_iterator::operator== | ( | const leaf_iterator & | other | ) | const

References tree< T, tree_node_allocator >::iterator_base::node, and tree< T, tree_node_allocator >::leaf_iterator::top_node.

## Member Data Documentation

## ◆ top_node

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

tree_node* tree< T, tree_node_allocator >::leaf_iterator::top_node
| private

Referenced by tree< T, tree_node_allocator >::leaf_iterator::operator==().

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

- /build/liborigin2/src/liborigin2/tree.hh