StringVariableMap_serialize Subroutine

public subroutine StringVariableMap_serialize(map, buffer, rc)

Arguments

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

Calls

proc~~stringvariablemap_serialize~~CallsGraph proc~stringvariablemap_serialize StringVariableMap_serialize interface~serialize_buffer_length serialize_buffer_length proc~stringvariablemap_serialize->interface~serialize_buffer_length interface~serialize_intrinsic serialize_intrinsic proc~stringvariablemap_serialize->interface~serialize_intrinsic none~first~177 StringVariableMapIterator%first proc~stringvariablemap_serialize->none~first~177 none~ftn_begin~25 StringVariableMap%ftn_begin proc~stringvariablemap_serialize->none~ftn_begin~25 none~ftn_end~25 StringVariableMap%ftn_end proc~stringvariablemap_serialize->none~ftn_end~25 none~next~82 StringVariableMapIterator%next proc~stringvariablemap_serialize->none~next~82 none~serialize~6 Variable%serialize proc~stringvariablemap_serialize->none~serialize~6 proc~mapl_return MAPL_Return proc~stringvariablemap_serialize->proc~mapl_return proc~mapl_verify MAPL_Verify proc~stringvariablemap_serialize->proc~mapl_verify none~of~152 StringVariableMapIterator%of none~first~177->none~of~152 to_node to_node none~ftn_end~25->to_node none~next~82->to_node none~serialize~6->interface~serialize_buffer_length none~serialize~6->interface~serialize_intrinsic none~serialize~6->proc~mapl_return none~serialize~6->proc~mapl_verify none~serialize~2 UnlimitedEntity%serialize none~serialize~6->none~serialize~2 proc~stringattributemap_serialize StringAttributeMap_serialize none~serialize~6->proc~stringattributemap_serialize proc~stringvector_serialize StringVector_serialize none~serialize~6->proc~stringvector_serialize 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 proc~mapl_verify->proc~mapl_throw_exception none~serialize~2->interface~serialize_buffer_length none~serialize~2->interface~serialize_intrinsic none~serialize~2->proc~mapl_return interface~mapl_assert MAPL_Assert none~serialize~2->interface~mapl_assert none~get_rank UnlimitedEntity%get_rank none~serialize~2->none~get_rank proc~stringattributemap_serialize->interface~serialize_buffer_length proc~stringattributemap_serialize->interface~serialize_intrinsic proc~stringattributemap_serialize->proc~mapl_return proc~stringattributemap_serialize->none~serialize~2 none~begin~52 StringAttributeMap%begin proc~stringattributemap_serialize->none~begin~52 none~key~44 StringAttributeMapIterator%key proc~stringattributemap_serialize->none~key~44 none~next~37 StringAttributeMapIterator%next proc~stringattributemap_serialize->none~next~37 proc~stringvector_serialize->interface~serialize_buffer_length proc~stringvector_serialize->interface~serialize_intrinsic begin begin proc~stringvector_serialize->begin next next proc~stringvector_serialize->next of of proc~stringvector_serialize->of none~get_rank->proc~mapl_return none~get_shape UnlimitedEntity%get_shape none~get_rank->none~get_shape

Called by

proc~~stringvariablemap_serialize~~CalledByGraph proc~stringvariablemap_serialize StringVariableMap_serialize none~serialize~8 FileMetadata%serialize none~serialize~8->proc~stringvariablemap_serialize proc~stringvariablemap_get_length StringVariableMap_get_length proc~stringvariablemap_get_length->proc~stringvariablemap_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 StringVariableMap_serialize(map, buffer, rc)
       type (StringVariableMap), target, intent(in):: map
       integer, allocatable, intent(inout) :: buffer(:)
       integer, optional, intent(out) :: rc

       type (StringVariableMapIterator) :: iter
       character(len=:),pointer :: key
       class(Variable),pointer :: var_ptr
       integer :: length, status
       integer, allocatable :: tmp_buffer(:)

       if (allocated(buffer)) deallocate(buffer)
       allocate(buffer(0))
       iter = map%ftn_begin()
       do while (iter /= map%ftn_end())
          call iter%next()
          key => iter%first()
          buffer=[buffer,serialize_intrinsic(key)]
          var_ptr => iter%second()
          call var_ptr%serialize(tmp_buffer, status)
          _VERIFY(status)
          buffer = [buffer, tmp_buffer]
          deallocate(tmp_buffer)
       enddo
       length = serialize_buffer_length(length)+size(buffer)
       buffer = [serialize_intrinsic(length),buffer]
       _RETURN(_SUCCESS)
    end subroutine StringVariableMap_serialize