MONC
Private Member Functions | List of all members
collections_mod::c_next_generic Interface Reference

Private Member Functions

class(*) function, pointer iterator_get_next_generic (iterator)
 Returns the next generic referenced by the iterator and advanced it, or null if it has reached the end of iteration. More...
 

Detailed Description

Definition at line 610 of file collections.F90.

Member Function/Subroutine Documentation

◆ iterator_get_next_generic()

class(*) function, pointer collections_mod::c_next_generic::iterator_get_next_generic ( type(iterator_type), intent(inout)  iterator)
private

Returns the next generic referenced by the iterator and advanced it, or null if it has reached the end of iteration.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next generic or null if none is found

Definition at line 3294 of file collections.F90.

3295  type(iterator_type), intent(inout) :: iterator
3296  class(*), pointer :: iterator_get_next_generic
3297 
3298  integer :: i
3299 
3300  if (associated(iterator%next_item)) then
3301  iterator_get_next_generic=>iterator%next_item%data
3302  iterator%next_item=>iterator%next_item%next
3303  if (.not. associated(iterator%next_item) .and. associated(iterator%hash_structure) .and. &
3304  iterator%hash_ptr .le. size(iterator%hash_structure)) then
3305  do i=iterator%hash_ptr, size(iterator%hash_structure)
3306  if (iterator%hash_structure(i)%size .gt. 0) then
3307  iterator%next_item=>iterator%hash_structure(i)%head
3308  exit
3309  end if
3310  end do
3311  iterator%hash_ptr=i+1
3312  end if
3313  else
3314  iterator_get_next_generic=>null()
3315  end if

The documentation for this interface was generated from the following file: