StringIntegerMap_serialize Subroutine

public subroutine StringIntegerMap_serialize(map, buffer)

Arguments

Type IntentOptional Attributes Name
type(StringIntegerMap), intent(in), target :: map
integer, intent(inout), allocatable :: buffer(:)

Calls

proc~~stringintegermap_serialize~~CallsGraph proc~stringintegermap_serialize StringIntegerMap_serialize begin begin proc~stringintegermap_serialize->begin first first proc~stringintegermap_serialize->first interface~serialize_buffer_length serialize_buffer_length proc~stringintegermap_serialize->interface~serialize_buffer_length interface~serialize_intrinsic serialize_intrinsic proc~stringintegermap_serialize->interface~serialize_intrinsic next next proc~stringintegermap_serialize->next

Called by

proc~~stringintegermap_serialize~~CalledByGraph proc~stringintegermap_serialize StringIntegerMap_serialize none~serialize~8 FileMetadata%serialize none~serialize~8->proc~stringintegermap_serialize proc~historycollectionvector_serialize HistoryCollectionVector_serialize proc~historycollectionvector_serialize->none~serialize~8 proc~test_serialize~4 test_serialize proc~test_serialize~4->none~serialize~8

Source Code

    subroutine StringIntegerMap_serialize(map,buffer)
       type (StringIntegerMap), target, intent(in):: map
       integer, allocatable,intent(inout) :: buffer(:)
       type (StringIntegerMapIterator) :: iter
       character(len=:),pointer :: key
       integer,pointer :: value
       integer :: length
 
       if (allocated(buffer)) deallocate(buffer)
       allocate(buffer(0))
       iter = map%begin()
       do while (iter /= map%end())
          key => iter%first()
          buffer=[buffer,serialize_intrinsic(key)]
          value => iter%second()
          buffer = [buffer, serialize_intrinsic(value)]
          call iter%next() 
       enddo
       length = serialize_buffer_length(length) + size(buffer)
       buffer = [serialize_intrinsic(length),buffer]

    end subroutine StringIntegerMap_serialize