herwig is hosted by Hepforge, IPPP Durham
Herwig 7.3.0
exsample::binary_tree< Value >::iterator Class Reference

iterator More...

#include <binary_tree.h>

Public Types

type definitions for iterator traits
typedef std::bidirectional_iterator_tag iterator_category
 define the iterator category
 
typedef int difference_type
 define the difference_type
 
typedef Value value_type
 define the value type
 
typedef value_typereference
 define the reference type
 
typedef value_typepointer
 define the pointer type
 

Public Member Functions

constructors
 iterator ()
 default constructor
 
 iterator (binary_tree *p, std::size_t end=0)
 constructor taking pointee
 
comparisons
bool operator== (const iterator &x) const
 comparison
 
bool operator!= (const iterator &x) const
 comparison
 
derefrence and indirection
reference operator* ()
 dereference
 
pointer operator-> ()
 indirection
 
binary_treenode ()
 return reference to the node
 
binary_treeget () const
 return raw pointer to the element pointed to
 

biderectional iterator increment/decrements

class const_iterator
 friend for conversion
 
binary_treepointee
 the node pointed to
 
std::size_t post_end
 the distance from –end() (if above –end())
 
std::size_t pre_begin
 the distance from begin() (if below begin())
 
iteratoroperator++ ()
 pre-increment
 
iteratoroperator-- ()
 pre-decrement
 
iterator operator++ (int)
 post-increment
 
iterator operator-- (int)
 post-decrement
 

Detailed Description

template<class Value>
class exsample::binary_tree< Value >::iterator

iterator

Definition at line 97 of file binary_tree.h.

Member Typedef Documentation

◆ difference_type

template<class Value >
typedef int exsample::binary_tree< Value >::iterator::difference_type

define the difference_type

Definition at line 108 of file binary_tree.h.

◆ iterator_category

template<class Value >
typedef std::bidirectional_iterator_tag exsample::binary_tree< Value >::iterator::iterator_category

define the iterator category

Definition at line 105 of file binary_tree.h.

◆ pointer

template<class Value >
typedef value_type* exsample::binary_tree< Value >::iterator::pointer

define the pointer type

Definition at line 117 of file binary_tree.h.

◆ reference

template<class Value >
typedef value_type& exsample::binary_tree< Value >::iterator::reference

define the reference type

Definition at line 114 of file binary_tree.h.

◆ value_type

template<class Value >
typedef Value exsample::binary_tree< Value >::iterator::value_type

define the value type

Definition at line 111 of file binary_tree.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

template<class Value >
exsample::binary_tree< Value >::iterator::iterator ( )
inline

default constructor

Definition at line 127 of file binary_tree.h.

◆ iterator() [2/2]

template<class Value >
exsample::binary_tree< Value >::iterator::iterator ( binary_tree p,
std::size_t  end = 0 
)
inline

constructor taking pointee

Definition at line 130 of file binary_tree.h.

Member Function Documentation

◆ get()

template<class Value >
binary_tree * exsample::binary_tree< Value >::iterator::get ( ) const
inline

return raw pointer to the element pointed to

Definition at line 169 of file binary_tree.h.

References exsample::binary_tree< Value >::iterator::pointee.

◆ node()

template<class Value >
binary_tree & exsample::binary_tree< Value >::iterator::node ( )
inline

return reference to the node

Definition at line 164 of file binary_tree.h.

References exsample::binary_tree< Value >::iterator::pointee.

◆ operator!=()

template<class Value >
bool exsample::binary_tree< Value >::iterator::operator!= ( const iterator x) const
inline

comparison

Definition at line 148 of file binary_tree.h.

◆ operator*()

template<class Value >
reference exsample::binary_tree< Value >::iterator::operator* ( )
inline

◆ operator++() [1/2]

◆ operator++() [2/2]

template<class Value >
iterator exsample::binary_tree< Value >::iterator::operator++ ( int  )
inline

post-increment

Definition at line 193 of file binary_tree.h.

◆ operator--() [1/2]

◆ operator--() [2/2]

template<class Value >
iterator exsample::binary_tree< Value >::iterator::operator-- ( int  )
inline

post-decrement

Definition at line 200 of file binary_tree.h.

◆ operator->()

template<class Value >
pointer exsample::binary_tree< Value >::iterator::operator-> ( )
inline

indirection

Definition at line 161 of file binary_tree.h.

◆ operator==()

template<class Value >
bool exsample::binary_tree< Value >::iterator::operator== ( const iterator x) const
inline

Friends And Related Function Documentation

◆ const_iterator

template<class Value >
friend class const_iterator
friend

friend for conversion

Definition at line 211 of file binary_tree.h.

Member Data Documentation

◆ pointee

◆ post_end

template<class Value >
std::size_t exsample::binary_tree< Value >::iterator::post_end
private

◆ pre_begin

template<class Value >
std::size_t exsample::binary_tree< Value >::iterator::pre_begin
private

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