#include <branch_iter_ind.hh>
Public Member Functions | |
branch_iter_ind (branch< T > branch) | |
unsigned | deepness () const |
Give how deep is the iterator in the branch. | |
void | invalidate () |
Invalidate the iterator. | |
bool | is_valid () const |
Test the iterator validity. | |
void | next () |
Go to the next point. | |
operator util::tree_node< T > & () const | |
Conversion to node. | |
util::tree_node< T > & | operator* () |
void | start () |
Start an iteration. | |
Private Attributes | |
util::branch< T > | branch_ |
The branch to iter. | |
util::tree_node< T > * | n_ |
std::stack< bi_elt< T > > | s_ |
Store child().begin() and child().end(). |
The parameter T
is the type of node's data. branch_iter_ind is used to pre-order walk a branch.
Definition at line 66 of file branch_iter_ind.hh.
mln::util::branch_iter_ind< T >::branch_iter_ind | ( | branch< T > | branch | ) | [inline] |
Definition at line 105 of file branch_iter_ind.hh.
References mln::util::branch_iter_ind< T >::invalidate().
unsigned mln::util::branch_iter_ind< T >::deepness | ( | ) | const [inline] |
Give how deep is the iterator in the branch.
Definition at line 131 of file branch_iter_ind.hh.
References mln::util::branch_iter_ind< T >::is_valid(), mln::util::branch_iter_ind< T >::n_, and mln::util::tree_node< T >::parent().
void mln::util::branch_iter_ind< T >::invalidate | ( | ) | [inline] |
Invalidate the iterator.
Definition at line 155 of file branch_iter_ind.hh.
References mln::util::branch_iter_ind< T >::n_.
Referenced by mln::util::branch_iter_ind< T >::branch_iter_ind(), and mln::util::branch_iter_ind< T >::next().
bool mln::util::branch_iter_ind< T >::is_valid | ( | ) | const [inline] |
Test the iterator validity.
Definition at line 147 of file branch_iter_ind.hh.
References mln::util::branch_iter_ind< T >::n_.
Referenced by mln::util::branch_iter_ind< T >::deepness().
void mln::util::branch_iter_ind< T >::next | ( | ) | [inline] |
Go to the next point.
Definition at line 174 of file branch_iter_ind.hh.
References mln::util::branch_iter_ind< T >::invalidate(), mln::util::branch_iter_ind< T >::n_, and mln::util::branch_iter_ind< T >::s_.
mln::util::branch_iter_ind< T >::operator util::tree_node< T > & | ( | ) | const [inline] |
Conversion to node.
Definition at line 113 of file branch_iter_ind.hh.
References mln::util::branch_iter_ind< T >::n_.
util::tree_node< T > & mln::util::branch_iter_ind< T >::operator* | ( | ) | [inline] |
void mln::util::branch_iter_ind< T >::start | ( | ) | [inline] |
Start an iteration.
Definition at line 164 of file branch_iter_ind.hh.
References mln::util::branch_iter_ind< T >::branch_, mln::util::branch_iter_ind< T >::n_, and mln::util::branch_iter_ind< T >::s_.
util::branch<T> mln::util::branch_iter_ind< T >::branch_ [private] |
The branch to iter.
Definition at line 92 of file branch_iter_ind.hh.
Referenced by mln::util::branch_iter_ind< T >::start().
util::tree_node<T>* mln::util::branch_iter_ind< T >::n_ [private] |
Definition at line 97 of file branch_iter_ind.hh.
Referenced by mln::util::branch_iter_ind< T >::deepness(), mln::util::branch_iter_ind< T >::invalidate(), mln::util::branch_iter_ind< T >::is_valid(), mln::util::branch_iter_ind< T >::next(), mln::util::branch_iter_ind< T >::operator util::tree_node< T > &(), mln::util::branch_iter_ind< T >::operator*(), and mln::util::branch_iter_ind< T >::start().
std::stack< bi_elt<T> > mln::util::branch_iter_ind< T >::s_ [private] |
Store child().begin() and child().end().
Definition at line 95 of file branch_iter_ind.hh.
Referenced by mln::util::branch_iter_ind< T >::next(), and mln::util::branch_iter_ind< T >::start().