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

Private Member Functions

type(mapentry_type) function iterator_get_next_mapentry (iterator)
 Returns the next mapentry referenced by the iterator and advanced it, or an error if it has reached the end of iteration or the next item was not a mapentry. More...
 

Detailed Description

Definition at line 606 of file collections.F90.

Member Function/Subroutine Documentation

◆ iterator_get_next_mapentry()

type(mapentry_type) function collections_mod::c_next_mapentry::iterator_get_next_mapentry ( type(iterator_type), intent(inout)  iterator)
private

Returns the next mapentry referenced by the iterator and advanced it, or an error if it has reached the end of iteration or the next item was not a mapentry.

Parameters
iteratorThe iterator of which to access and advance the next element
Returns
The next map entry

Definition at line 3272 of file collections.F90.

3272  type(iterator_type), intent(inout) :: iterator
3273  type(mapentry_type) :: iterator_get_next_mapentry
3274 
3275  class(*), pointer :: generic
3276 
3277  generic=>iterator_get_next_generic(iterator)
3278  if (associated(generic)) then
3279  select type(generic)
3280  type is (mapnode_type)
3281  iterator_get_next_mapentry%key=generic%key
3282  iterator_get_next_mapentry%value=>generic%value
3283  class default
3284  call log_log(log_error, "Next item in iterator is not a map entry")
3285  end select
3286  else
3287  call log_log(log_error, "Can not get next map entry in iterator as iterator has reached end of collection")
3288  end if

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