StringVariableMap_deserialize Subroutine

public subroutine StringVariableMap_deserialize(buffer, map, rc)

Arguments

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

Calls

proc~~stringvariablemap_deserialize~~CallsGraph proc~stringvariablemap_deserialize StringVariableMap_deserialize interface~deserialize_intrinsic deserialize_intrinsic proc~stringvariablemap_deserialize->interface~deserialize_intrinsic interface~mapl_assert MAPL_Assert proc~stringvariablemap_deserialize->interface~mapl_assert interface~serialize_buffer_length serialize_buffer_length proc~stringvariablemap_deserialize->interface~serialize_buffer_length none~insert~7 StringVariableMap%insert proc~stringvariablemap_deserialize->none~insert~7 proc~coordinatevariable_deserialize CoordinateVariable_deserialize proc~stringvariablemap_deserialize->proc~coordinatevariable_deserialize proc~mapl_return MAPL_Return proc~stringvariablemap_deserialize->proc~mapl_return proc~mapl_verify MAPL_Verify proc~stringvariablemap_deserialize->proc~mapl_verify proc~variable_deserialize Variable_deserialize proc~stringvariablemap_deserialize->proc~variable_deserialize none~insert_pair StringVariableMap%insert_pair none~insert~7->none~insert_pair proc~coordinatevariable_deserialize->interface~deserialize_intrinsic proc~coordinatevariable_deserialize->interface~mapl_assert proc~coordinatevariable_deserialize->interface~serialize_buffer_length proc~coordinatevariable_deserialize->proc~mapl_return proc~coordinatevariable_deserialize->proc~mapl_verify proc~coordinatevariable_deserialize->proc~variable_deserialize 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 proc~variable_deserialize->interface~deserialize_intrinsic proc~variable_deserialize->interface~mapl_assert proc~variable_deserialize->interface~serialize_buffer_length proc~variable_deserialize->proc~mapl_return proc~variable_deserialize->proc~mapl_verify proc~stringattributemap_deserialize StringAttributeMap_deserialize proc~variable_deserialize->proc~stringattributemap_deserialize proc~stringvector_deserialize StringVector_deserialize proc~variable_deserialize->proc~stringvector_deserialize proc~unlimitedentity_deserialize UnlimitedEntity_deserialize proc~variable_deserialize->proc~unlimitedentity_deserialize proc~stringattributemap_deserialize->interface~deserialize_intrinsic proc~stringattributemap_deserialize->interface~mapl_assert proc~stringattributemap_deserialize->interface~serialize_buffer_length proc~stringattributemap_deserialize->proc~mapl_return proc~stringattributemap_deserialize->proc~mapl_verify none~insert~98 StringAttributeMap%insert proc~stringattributemap_deserialize->none~insert~98 proc~attribute_deserialize Attribute_deserialize proc~stringattributemap_deserialize->proc~attribute_deserialize proc~stringvector_deserialize->interface~deserialize_intrinsic proc~stringvector_deserialize->interface~serialize_buffer_length proc~stringvector_deserialize->proc~mapl_return push_back push_back proc~stringvector_deserialize->push_back stringvector stringvector proc~stringvector_deserialize->stringvector proc~unlimitedentity_deserialize->interface~deserialize_intrinsic proc~unlimitedentity_deserialize->interface~mapl_assert proc~unlimitedentity_deserialize->interface~serialize_buffer_length proc~unlimitedentity_deserialize->proc~mapl_return proc~unlimitedentity_deserialize->proc~mapl_verify none~get_rank UnlimitedEntity%get_rank proc~unlimitedentity_deserialize->none~get_rank none~set~63 UnlimitedEntity%set proc~unlimitedentity_deserialize->none~set~63 none~get_rank->proc~mapl_return none~get_shape UnlimitedEntity%get_shape none~get_rank->none~get_shape none~insert_pair~12 StringAttributeMap%insert_pair none~insert~98->none~insert_pair~12 none~set~63->proc~mapl_return proc~attribute_deserialize->proc~mapl_return proc~attribute_deserialize->proc~mapl_verify proc~attribute_deserialize->proc~unlimitedentity_deserialize

Called by

proc~~stringvariablemap_deserialize~~CalledByGraph proc~stringvariablemap_deserialize StringVariableMap_deserialize proc~filemetadata_deserialize FileMetadata_deserialize proc~filemetadata_deserialize->proc~stringvariablemap_deserialize proc~historycollectionvector_deserialize HistoryCollectionVector_deserialize proc~historycollectionvector_deserialize->proc~filemetadata_deserialize proc~test_serialize~5 test_serialize proc~test_serialize~5->proc~filemetadata_deserialize

Source Code

    subroutine StringVariableMap_deserialize(buffer, map, rc)
       integer, intent(in) :: buffer(:)
       type (StringVariableMap), intent(inout) :: map
       integer, optional, intent(out) :: rc

       character(len=:),allocatable :: key
       integer :: length,n,n0,n1,n2, v_type
       type (Variable) :: v
       type (CoordinateVariable) :: c 
       integer :: status

       n = 1
       call deserialize_intrinsic(buffer(n:),length)
       _ASSERT(length <= size(buffer), "stringVarmap length does not match")

       n0 = serialize_buffer_length(length)
       n = n + n0
       length = length - n0
       map = StringVariableMap()
       do while (length > 0)
          call deserialize_intrinsic(buffer(n:),key)
          n1 = serialize_buffer_length(key)
          n = n + n1

          ! the first one is length, the second one is type          
          call deserialize_intrinsic(buffer(n:),n2)
          call deserialize_intrinsic(buffer(n+1:),v_type)

          if (v_type == Variable_SERIALIZE_TYPE) then
             call Variable_deserialize(buffer(n:n+n2-1),v, status)
             _VERIFY(status)
             call map%insert(key,v)
          else if (v_type == Coord_SERIALIZE_TYPE) then
             call CoordinateVariable_deserialize(buffer(n:n+n2-1),c, status)
             _VERIFY(status)
             call map%insert(key,c)
          endif

          n = n + n2
          length = length - n1 - n2
          deallocate(key)
       enddo
       _RETURN(_SUCCESS)
    end subroutine StringVariableMap_deserialize