37 iterator%first_node => first_node
38 iterator%current_node => null()
49 if (
associated(this%current_node))
then
50 res =
associated(this%current_node%nextNode)
52 res =
associated(this%first_node)
63 if (
associated(this%current_node))
then
64 this%current_node => this%current_node%nextNode
66 this%current_node => this%first_node
73 function value(this)
result(res)
75 class(*),
pointer :: res
77 if (
associated(this%current_node))
then
78 res => this%current_node%GetItem()
This module defines variable data types.
subroutine next(this)
Increment the iterator to the next node.
type(listiteratortype) function constructor(first_node)
Constructor to create a ListIterator.
logical(lgp) function has_next(this)
Indicates if there is a next node in the iteration chain.
class(*) function, pointer value(this)
Get the value the iterator is pointing at.
An iterator used to iterate through a List.