route_breadth_first_iterator

class route_breadth_first_iterator #(type T =  int) extends iterator#( T )

Provides a breadth-first iterator to a route.

Parameter

Toptional The type of data collected in a route.  The default is int.
Summary
route_breadth_first_iteratorProvides a breadth-first iterator to a route.
Types
route_node_typeThe shorthand of the route_node type specialized with type T.
route_typeThe shorthand of the route type specialized with type T.
newCreates a route iterator.
has_nextvirtual Returns 1 if the iterator has more elements.
nextvirtual Returns the next element.
next_nodevirtual Returns the next route_node.
removevirtual Removes the last element returned by the iterator.

Types

route_node_type

typedef route_node#(T) route_node_type

The shorthand of the route_node type specialized with type T.

route_type

typedef route#(T) route_type

The shorthand of the route type specialized with type T.

new

function new(route_type r)

Creates a route iterator.

Argument

rA route to be iterated.

has_next

virtual function bit has_next()

virtual Returns 1 if the iterator has more elements.

Returns

If the iterator has more elements, returns 1.  Otherwise, returns 0.

next

virtual function T next()

virtual Returns the next element.

Returns

The next element in the iterator.

next_node

virtual function route_node_type next_node()

virtual Returns the next route_node.

Returns

The next route node in the route.

remove

virtual function void remove()

virtual Removes the last element returned by the iterator.  This function can be called once per call to next or next_node.

Returns

None.

class route_breadth_first_iterator #(type T =  int) extends iterator#( T )
Provides a breadth-first iterator to a route.
class route #(type T =  int) extends collection#( T )
Implements a route structure.
typedef route_node#(T) route_node_type
The shorthand of the route_node type specialized with type T.
class route_node #(type T =  int)
Implements a node of a route.
typedef route#(T) route_type
The shorthand of the route type specialized with type T.
function new(route_type r)
Creates a route iterator.
virtual function bit has_next()
virtual Returns 1 if the iterator has more elements.
virtual function T next()
virtual Returns the next element.
virtual function route_node_type next_node()
virtual Returns the next route_node.
virtual function void remove()
virtual Removes the last element returned by the iterator.