StringIntegerMap_deserialize Subroutine

public subroutine StringIntegerMap_deserialize(buffer, map, rc)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: buffer(:)
type(StringIntegerMap), intent(inout) :: map
integer, intent(out), optional :: rc

Calls

proc~~stringintegermap_deserialize~~CallsGraph proc~stringintegermap_deserialize StringIntegerMap_deserialize insert insert proc~stringintegermap_deserialize->insert interface~deserialize_intrinsic deserialize_intrinsic proc~stringintegermap_deserialize->interface~deserialize_intrinsic interface~serialize_buffer_length serialize_buffer_length proc~stringintegermap_deserialize->interface~serialize_buffer_length proc~mapl_return MAPL_Return proc~stringintegermap_deserialize->proc~mapl_return stringintegermap stringintegermap proc~stringintegermap_deserialize->stringintegermap proc~mapl_return->insert at at proc~mapl_return->at proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception

Called by

proc~~stringintegermap_deserialize~~CalledByGraph proc~stringintegermap_deserialize StringIntegerMap_deserialize proc~filemetadata_deserialize FileMetadata_deserialize proc~filemetadata_deserialize->proc~stringintegermap_deserialize proc~historycollectionvector_deserialize HistoryCollectionVector_deserialize proc~historycollectionvector_deserialize->proc~filemetadata_deserialize proc~test_serialize~4 test_serialize proc~test_serialize~4->proc~filemetadata_deserialize

Source Code

    subroutine StringIntegerMap_deserialize(buffer, map, rc)
       integer, intent(in) :: buffer(:)
       type (StringIntegerMap), intent(inout) :: map
       integer, optional, intent(out) :: rc

       character(len=:),allocatable :: key
       integer :: value,length,n,n0,n1,n2

       n = 1
       call deserialize_intrinsic(buffer(n:),length)
       n0 = serialize_buffer_length(length)
       n = n + n0
       length = length - n0
       map = StringIntegerMap()
       do while (length > 0)
          call deserialize_intrinsic(buffer(n:),key)
          n1 = serialize_buffer_length(key)
          n = n + n1
          call deserialize_intrinsic(buffer(n:),value)
          n2 = serialize_buffer_length(value)
          n = n + n2
          length = length - n1 - n2
          call map%insert(key,value)
          deallocate(key)
       enddo
       _RETURN(_SUCCESS)
    end subroutine StringIntegerMap_deserialize