matador::tree_iterator< T > Class Template Reference

#include <tree.hpp>

Inherits matador::tree_iterator_base< T >.

Public Types

typedef tree_iterator_base< T >::t_node node_type
 
- Public Types inherited from matador::tree_iterator_base< T >
typedef tree_iterator_base< T > self
 
typedef t_tree_node< T > t_node
 
typedef T value_type
 
typedef T * pointer
 
typedef T & reference
 

Public Member Functions

 tree_iterator ()=default
 
 tree_iterator (const tree_iterator< T > &x)
 
 tree_iterator (const tree_iterator_base< T > &x)
 
 tree_iterator (node_type *n)
 
tree_iterator< T > & operator= (const tree_iterator< T > &x)
 
tree_iterator< T > & operator= (tree_iterator< T > &&x) noexcept
 
- Public Member Functions inherited from matador::tree_iterator_base< T >
 tree_iterator_base ()=default
 
 tree_iterator_base (t_node *n)
 
tree_iterator_base< T > & operator= (const tree_iterator_base< T > &x)=default
 
tree_iterator_base< T > & operator= (tree_iterator_base< T > &&x) noexcept=default
 
virtual ~tree_iterator_base ()=default
 
bool operator== (const self &i) const
 
bool operator== (const const_tree_iterator_base< T > &i) const
 
bool operator!= (const self &i) const
 
bool operator!= (const 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.
 

Detailed Description

template<typename T>
class matador::tree_iterator< T >

Default tree iterator iterates tree level by level from left to right starting with the root node

Template Parameters
TType of the tree

Member Typedef Documentation

◆ node_type

template<typename T >
typedef tree_iterator_base<T>::t_node matador::tree_iterator< T >::node_type

Shortcut to node class

Constructor & Destructor Documentation

◆ tree_iterator() [1/4]

template<typename T >
matador::tree_iterator< T >::tree_iterator ( )
default

Default constructor

◆ tree_iterator() [2/4]

template<typename T >
matador::tree_iterator< T >::tree_iterator ( const tree_iterator< T > &  x)
inline

Copy constructor

Parameters
xIterator to copy from

◆ tree_iterator() [3/4]

template<typename T >
matador::tree_iterator< T >::tree_iterator ( const tree_iterator_base< T > &  x)
inline

Copy from base iterator class

Parameters
xIterator to copy from

◆ tree_iterator() [4/4]

template<typename T >
matador::tree_iterator< T >::tree_iterator ( node_type n)
inlineexplicit

Initializes the iterator with the given node

Parameters
nInitial node of the iterator

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
tree_iterator< T > & matador::tree_iterator< T >::operator= ( const tree_iterator< T > &  x)
inline

Copy assign constructor

Parameters
xIterator to copy from
Returns
The assign iterator

◆ operator=() [2/2]

template<typename T >
tree_iterator< T > & matador::tree_iterator< T >::operator= ( tree_iterator< T > &&  x)
inlinenoexcept

Move assign constructor

Parameters
xIterator to move assign from
Returns
The moved iterator

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