matador::const_tree_iterator_base< T > Class Template Reference

#include <tree.hpp>

Inherits std::iterator< std::bidirectional_iterator_tag, T, std::ptrdiff_t, const T &, const T * >.

Inherited by matador::const_tree_iterator< T >, matador::const_tree_leaf_iterator< T >, matador::const_tree_sibling_iterator< T >, and matador::const_tree_subtree_iterator< T >.

Public Types

typedef const_tree_iterator_base< T > self
 
typedef tree_iterator_base< T > iterator
 
typedef t_tree_node< T > t_node
 
typedef T value_type
 
typedef T * pointer
 
typedef T & reference
 

Public Member Functions

 const_tree_iterator_base ()=default
 
 const_tree_iterator_base (const iterator &x)
 
 const_tree_iterator_base (t_node *n)
 
virtual ~const_tree_iterator_base ()=default
 
bool operator== (const self &i) const
 
bool operator== (const tree_iterator_base< T > &i) const
 
bool operator!= (const self &i) const
 
bool operator!= (const tree_iterator_base< T > &i) const
 
reference operator* () const
 
pointer operator-> () const
 
selfoperator++ ()
 Pre increments self.
 
selfoperator-- ()
 Pre decrements self.
 
self operator++ (int)
 Post increments iterator.
 
self operator-- (int)
 Post decrements iterator.
 

Friends

class tree< T >
 
class tree_iterator< T >
 
class tree_iterator_base< T >
 

Detailed Description

template<class T>
class matador::const_tree_iterator_base< T >

Base class for const tree iterator types

Template Parameters
TType of the tree containing data

Member Typedef Documentation

◆ iterator

template<class T >
typedef tree_iterator_base<T> matador::const_tree_iterator_base< T >::iterator

Shortcut to non const tree iterator

◆ pointer

template<class T >
typedef T* matador::const_tree_iterator_base< T >::pointer

Shortcut to pointer of value type

◆ reference

template<class T >
typedef T& matador::const_tree_iterator_base< T >::reference

Shortcut to reference of value type

◆ self

template<class T >
typedef const_tree_iterator_base<T> matador::const_tree_iterator_base< T >::self

Shortcut to self

◆ t_node

template<class T >
typedef t_tree_node<T> matador::const_tree_iterator_base< T >::t_node

Shortcut to node class

◆ value_type

template<class T >
typedef T matador::const_tree_iterator_base< T >::value_type

Shortcut to value type

Constructor & Destructor Documentation

◆ const_tree_iterator_base() [1/3]

template<class T >
matador::const_tree_iterator_base< T >::const_tree_iterator_base ( )
default

Default constructor

◆ const_tree_iterator_base() [2/3]

template<class T >
matador::const_tree_iterator_base< T >::const_tree_iterator_base ( const iterator x)
inlineexplicit

Copy from iterator class

Parameters
xIterator to copy from

◆ const_tree_iterator_base() [3/3]

template<class T >
matador::const_tree_iterator_base< T >::const_tree_iterator_base ( t_node n)
inlineexplicit

Initializes the iterator with the given node

Parameters
nInitial node of the iterator

◆ ~const_tree_iterator_base()

template<class T >
virtual matador::const_tree_iterator_base< T >::~const_tree_iterator_base ( )
virtualdefault

Default destructor

Member Function Documentation

◆ operator!=() [1/2]

template<class T >
bool matador::const_tree_iterator_base< T >::operator!= ( const self i) const
inline

Not equal compares another iterator with this

Parameters
iThe iterator to compare
Returns
True if the iterators are not the same

◆ operator!=() [2/2]

template<class T >
bool matador::const_tree_iterator_base< T >::operator!= ( const tree_iterator_base< T > &  i) const
inline

Not equal compares another tree iterator with this

Parameters
iThe tree iterator to compare
Returns
True if the iterators are not the same

◆ operator*()

template<class T >
reference matador::const_tree_iterator_base< T >::operator* ( ) const
inline

Returns a reference nodes data

Returns
Reference to nodes data

◆ operator++() [1/2]

template<class T >
self & matador::const_tree_iterator_base< T >::operator++ ( )
inline

Pre increments self.

Returns
A reference to incremented self

◆ operator++() [2/2]

template<class T >
self matador::const_tree_iterator_base< T >::operator++ ( int  )
inline

Post increments iterator.

Post increments iterator and returns a new iterator object.

Returns
Returns new incremented iterator

◆ operator--() [1/2]

template<class T >
self & matador::const_tree_iterator_base< T >::operator-- ( )
inline

Pre decrements self.

Returns
A reference to decremented self

◆ operator--() [2/2]

template<class T >
self matador::const_tree_iterator_base< T >::operator-- ( int  )
inline

Post decrements iterator.

Post decrements iterator and returns a new iterator object.

Returns
Returns new decremented iterator

◆ operator->()

template<class T >
pointer matador::const_tree_iterator_base< T >::operator-> ( ) const
inline

Returns a reference nodes data

Returns
Reference to nodes data

◆ operator==() [1/2]

template<class T >
bool matador::const_tree_iterator_base< T >::operator== ( const self i) const
inline

Equal compares another iterator with this

Parameters
iThe iterator to compare
Returns
True if the iterators are the same

◆ operator==() [2/2]

template<class T >
bool matador::const_tree_iterator_base< T >::operator== ( const tree_iterator_base< T > &  i) const
inline

Equal compares another tree iterator with this

Parameters
iThe tree iterator to compare
Returns
True if the iterators are the same

The documentation for this class was generated from the following file:
  • matador/utils/tree.hpp