StringUnlimitedEntityMap_serialize Subroutine

public subroutine StringUnlimitedEntityMap_serialize(map, buffer)

Arguments

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

Calls

proc~~stringunlimitedentitymap_serialize~~CallsGraph proc~stringunlimitedentitymap_serialize StringUnlimitedEntityMap_serialize interface~serialize_buffer_length serialize_buffer_length proc~stringunlimitedentitymap_serialize->interface~serialize_buffer_length interface~serialize_intrinsic serialize_intrinsic proc~stringunlimitedentitymap_serialize->interface~serialize_intrinsic none~begin~64 StringUnlimitedEntityMap%begin proc~stringunlimitedentitymap_serialize->none~begin~64 none~key~150 StringUnlimitedEntityMapIterator%key proc~stringunlimitedentitymap_serialize->none~key~150 none~next~64 StringUnlimitedEntityMapIterator%next proc~stringunlimitedentitymap_serialize->none~next~64 none~serialize~18 UnlimitedEntity%serialize proc~stringunlimitedentitymap_serialize->none~serialize~18 none~serialize~18->interface~serialize_buffer_length none~serialize~18->interface~serialize_intrinsic interface~mapl_assert MAPL_Assert none~serialize~18->interface~mapl_assert none~get_rank UnlimitedEntity%get_rank none~serialize~18->none~get_rank proc~mapl_return MAPL_Return none~serialize~18->proc~mapl_return none~get_rank->proc~mapl_return none~get_shape UnlimitedEntity%get_shape none~get_rank->none~get_shape at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception none~get_shape->proc~mapl_return

Source Code

    subroutine StringUnlimitedEntityMap_serialize(map,buffer)
       type (StringUnlimitedEntityMap) ,intent(in):: map
       integer, allocatable,intent(inout) :: buffer(:)
       type (StringUnlimitedEntityMapIterator) :: iter
       character(len=:),pointer :: key
       type(UnlimitedEntity),pointer :: attr_ptr
       integer :: length
       integer, allocatable :: tmp_buffer(:)

       if (allocated(buffer)) deallocate(buffer)
       allocate(buffer(0))
       iter = map%begin()
       do while (iter /= map%end())
          key => iter%key()
          buffer=[buffer,serialize_intrinsic(key)]
          attr_ptr => iter%value()
          call attr_ptr%serialize(tmp_buffer)
          buffer = [buffer, tmp_buffer]
          deallocate(tmp_buffer)
          call iter%next()
       enddo
       length = serialize_buffer_length(length)+size(buffer)
       buffer = [serialize_intrinsic(length),buffer]
    end subroutine StringUnlimitedEntityMap_serialize