StringAttributeMap_serialize Subroutine

public subroutine StringAttributeMap_serialize(map, buffer, rc)

Arguments

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

Calls

proc~~stringattributemap_serialize~~CallsGraph proc~stringattributemap_serialize pFIO_StringAttributeMapUtilMod::StringAttributeMap_serialize interface~serialize_buffer_length pFIO_UtilitiesMod::serialize_buffer_length proc~stringattributemap_serialize->interface~serialize_buffer_length interface~serialize_intrinsic pFIO_UtilitiesMod::serialize_intrinsic proc~stringattributemap_serialize->interface~serialize_intrinsic none~begin~5 pFIO_StringAttributeMapMod::StringAttributeMap%begin proc~stringattributemap_serialize->none~begin~5 none~key~2 pFIO_StringAttributeMapMod::StringAttributeMapIterator%key proc~stringattributemap_serialize->none~key~2 none~next~4 pFIO_StringAttributeMapMod::StringAttributeMapIterator%next proc~stringattributemap_serialize->none~next~4 none~serialize pFIO_UnlimitedEntityMod::UnlimitedEntity%serialize proc~stringattributemap_serialize->none~serialize proc~mapl_return MAPL_ErrorHandlingMod::MAPL_Return proc~stringattributemap_serialize->proc~mapl_return none~serialize->interface~serialize_buffer_length none~serialize->interface~serialize_intrinsic none~serialize->proc~mapl_return interface~mapl_assert MAPL_ErrorHandlingMod::MAPL_Assert none~serialize->interface~mapl_assert none~get_rank pFIO_UnlimitedEntityMod::UnlimitedEntity%get_rank none~serialize->none~get_rank at at proc~mapl_return->at insert insert proc~mapl_return->insert proc~mapl_throw_exception MAPL_ThrowMod::MAPL_throw_exception proc~mapl_return->proc~mapl_throw_exception none~get_rank->proc~mapl_return none~get_shape pFIO_UnlimitedEntityMod::UnlimitedEntity%get_shape none~get_rank->none~get_shape none~get_shape->proc~mapl_return

Called by

proc~~stringattributemap_serialize~~CalledByGraph proc~stringattributemap_serialize pFIO_StringAttributeMapUtilMod::StringAttributeMap_serialize none~serialize~3 pFIO_VariableMod::Variable%serialize none~serialize~3->proc~stringattributemap_serialize none~serialize~2 pFIO_FileMetadataMod::FileMetadata%serialize none~serialize~2->none~serialize~3 proc~stringvariablemap_serialize pFIO_StringVariableMapUtilMod::StringVariableMap_serialize none~serialize~2->proc~stringvariablemap_serialize none~serialize~5 pFIO_CoordinateVariableMod::CoordinateVariable%serialize none~serialize~5->none~serialize~3 proc~stringvariablemap_serialize->none~serialize~3 proc~test_serialize~2 Test_Variable::test_serialize proc~test_serialize~2->none~serialize~3 proc~historycollectionvector_serialize pFIO_HistoryCollectionVectorUtilMod::HistoryCollectionVector_serialize proc~historycollectionvector_serialize->none~serialize~2 proc~stringvariablemap_get_length pFIO_StringVariableMapUtilMod::StringVariableMap_get_length proc~stringvariablemap_get_length->proc~stringvariablemap_serialize proc~test_serialize~4 Test_CoordinateVariable::test_serialize proc~test_serialize~4->none~serialize~5 proc~test_serialize~5 Test_FileMetadata::test_serialize proc~test_serialize~5->none~serialize~2

Source Code

    subroutine StringAttributeMap_serialize(map,buffer, rc)
       type (StringAttributeMap), target, intent(in):: map
       integer, allocatable,intent(inout) :: buffer(:)
       integer, optional, intent(out) :: rc

       type (StringAttributeMapIterator) :: iter
       character(len=:),pointer :: key
       type(Attribute),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]
       _RETURN(_SUCCESS)
    end subroutine StringAttributeMap_serialize