class tree_breadth_first_iterator #( type T = int ) extends iterator#( T )
Provides a breadth-first iterator to a tree.
T | optional The type of data collected in a tree. The default is int. |
tree_breadth_first_iterator | Provides a breadth-first iterator to a tree. |
Types | |
tree_node_type | The shorthand of the tree_node type specialized with type T. |
tree_type | The shorthand of the tree type specialized with type T. |
new | Creates a tree iterator. |
has_next | virtual Returns 1 if the iterator has more elements. |
next | virtual Returns the next element. |
next_node | virtual Returns the next tree_node. |
remove | virtual Removes the last element returned by the iterator. |
typedef tree_node#( T ) tree_node_type
The shorthand of the tree_node type specialized with type T.
typedef tree#( T ) tree_type
The shorthand of the tree type specialized with type T.
virtual function tree_node_type next_node()
virtual Returns the next tree_node.
The next tree node in the tree.
Provides a breadth-first iterator to a tree.
class tree_breadth_first_iterator #( type T = int ) extends iterator#( T )
Implements a tree structure.
class tree #( type T = int ) extends collection#( T )
The shorthand of the tree_node type specialized with type T.
typedef tree_node#( T ) tree_node_type
Implements a node of a tree.
class tree_node #( type T = int )
The shorthand of the tree type specialized with type T.
typedef tree#( T ) tree_type
Creates a tree iterator.
function new( tree_type t )
virtual Returns 1 if the iterator has more elements.
virtual function bit has_next()
virtual Returns the next element.
virtual function T next()
virtual Returns the next tree_node.
virtual function tree_node_type next_node()
virtual Removes the last element returned by the iterator.
virtual function void remove()