MAPL_ServiceServicesTypes.F90 Source File


This file depends on

sourcefile~~mapl_serviceservicestypes.f90~~EfferentGraph sourcefile~mapl_serviceservicestypes.f90 MAPL_ServiceServicesTypes.F90 sourcefile~mapl_exceptionhandling.f90 MAPL_ExceptionHandling.F90 sourcefile~mapl_serviceservicestypes.f90->sourcefile~mapl_exceptionhandling.f90 sourcefile~errorhandling.f90 ErrorHandling.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~errorhandling.f90 sourcefile~mapl_throw.f90 MAPL_Throw.F90 sourcefile~mapl_exceptionhandling.f90->sourcefile~mapl_throw.f90 sourcefile~errorhandling.f90->sourcefile~mapl_throw.f90

Files dependent on this one

sourcefile~~mapl_serviceservicestypes.f90~~AfferentGraph sourcefile~mapl_serviceservicestypes.f90 MAPL_ServiceServicesTypes.F90 sourcefile~mapl_providedserviceitemvector.f90 MAPL_ProvidedServiceItemVector.F90 sourcefile~mapl_providedserviceitemvector.f90->sourcefile~mapl_serviceservicestypes.f90 sourcefile~mapl_requestedserviceitemvector.f90 MAPL_RequestedServiceItemVector.F90 sourcefile~mapl_requestedserviceitemvector.f90->sourcefile~mapl_serviceservicestypes.f90 sourcefile~mapl_serviceconnectionitemvector.f90 MAPL_ServiceConnectionItemVector.F90 sourcefile~mapl_serviceconnectionitemvector.f90->sourcefile~mapl_serviceservicestypes.f90 sourcefile~mapl_serviceservices.f90 MAPL_ServiceServices.F90 sourcefile~mapl_serviceservices.f90->sourcefile~mapl_serviceservicestypes.f90 sourcefile~mapl_serviceservices.f90->sourcefile~mapl_providedserviceitemvector.f90 sourcefile~mapl_serviceservices.f90->sourcefile~mapl_requestedserviceitemvector.f90 sourcefile~mapl_serviceservices.f90->sourcefile~mapl_serviceconnectionitemvector.f90 sourcefile~maplgeneric.f90 MaplGeneric.F90 sourcefile~maplgeneric.f90->sourcefile~mapl_serviceservicestypes.f90 sourcefile~maplgeneric.f90->sourcefile~mapl_providedserviceitemvector.f90 sourcefile~maplgeneric.f90->sourcefile~mapl_requestedserviceitemvector.f90 sourcefile~maplgeneric.f90->sourcefile~mapl_serviceconnectionitemvector.f90 sourcefile~maplgeneric.f90->sourcefile~mapl_serviceservices.f90 sourcefile~mapl_generic.f90 MAPL_Generic.F90 sourcefile~mapl_generic.f90->sourcefile~maplgeneric.f90 sourcefile~comp_testing_driver.f90 Comp_Testing_Driver.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl_generic.f90 sourcefile~mapl.f90 MAPL.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl.f90 sourcefile~mapl_capgridcomp.f90 MAPL_CapGridComp.F90 sourcefile~comp_testing_driver.f90->sourcefile~mapl_capgridcomp.f90 sourcefile~extdatagridcompmod.f90 ExtDataGridCompMod.F90 sourcefile~extdatagridcompmod.f90->sourcefile~mapl_generic.f90 sourcefile~extdatagridcompng.f90 ExtDataGridCompNG.F90 sourcefile~extdatagridcompng.f90->sourcefile~mapl_generic.f90 sourcefile~mapl.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~mapl_capgridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~mapl_historygridcomp.f90 MAPL_HistoryGridComp.F90 sourcefile~mapl_capgridcomp.f90->sourcefile~mapl_historygridcomp.f90 sourcefile~mapl_geosatmaskmod.f90 MAPL_GeosatMaskMod.F90 sourcefile~mapl_geosatmaskmod.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historycollection.f90 MAPL_HistoryCollection.F90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_geosatmaskmod.f90 sourcefile~mapl_stationsamplermod.f90 MAPL_StationSamplerMod.F90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_stationsamplermod.f90 sourcefile~mapl_trajectorymod.f90 MAPL_TrajectoryMod.F90 sourcefile~mapl_historycollection.f90->sourcefile~mapl_trajectorymod.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_geosatmaskmod.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_historycollection.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_stationsamplermod.f90 sourcefile~mapl_historygridcomp.f90->sourcefile~mapl_trajectorymod.f90 sourcefile~mapl_orbgridcompmod.f90 MAPL_OrbGridCompMod.F90 sourcefile~mapl_orbgridcompmod.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_stationsamplermod.f90->sourcefile~mapl_generic.f90 sourcefile~mapl_trajectorymod.f90->sourcefile~mapl_generic.f90 sourcefile~capdriver.f90 CapDriver.F90 sourcefile~capdriver.f90->sourcefile~mapl.f90 sourcefile~extdatadriver.f90 ExtDataDriver.F90 sourcefile~extdatadriver.f90->sourcefile~mapl.f90 sourcefile~extdatadrivergridcomp.f90 ExtDataDriverGridComp.F90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompmod.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~extdatagridcompng.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~mapl.f90 sourcefile~extdatadrivergridcomp.f90->sourcefile~mapl_historygridcomp.f90 sourcefile~extdatadrivermod.f90 ExtDataDriverMod.F90 sourcefile~extdatadrivermod.f90->sourcefile~mapl.f90 sourcefile~extdataroot_gridcomp.f90 ExtDataRoot_GridComp.F90 sourcefile~extdataroot_gridcomp.f90->sourcefile~mapl.f90 sourcefile~mapl_cap.f90 MAPL_Cap.F90 sourcefile~mapl_cap.f90->sourcefile~mapl_capgridcomp.f90 sourcefile~mapl_demo_fargparse.f90 MAPL_demo_fargparse.F90 sourcefile~mapl_demo_fargparse.f90->sourcefile~mapl.f90 sourcefile~mapl_geosatmaskmod_smod.f90 MAPL_GeosatMaskMod_smod.F90 sourcefile~mapl_geosatmaskmod_smod.f90->sourcefile~mapl_geosatmaskmod.f90 sourcefile~mapl_trajectorymod_smod.f90 MAPL_TrajectoryMod_smod.F90 sourcefile~mapl_trajectorymod_smod.f90->sourcefile~mapl_trajectorymod.f90 sourcefile~pfio_mapl_demo.f90 pfio_MAPL_demo.F90 sourcefile~pfio_mapl_demo.f90->sourcefile~mapl.f90 sourcefile~regrid_util.f90 Regrid_Util.F90 sourcefile~regrid_util.f90->sourcefile~mapl.f90 sourcefile~time_ave_util.f90 time_ave_util.F90 sourcefile~time_ave_util.f90->sourcefile~mapl.f90 sourcefile~ut_extdata.f90 ut_ExtData.F90 sourcefile~ut_extdata.f90->sourcefile~extdatagridcompmod.f90 sourcefile~varspecdescription.f90 VarspecDescription.F90 sourcefile~varspecdescription.f90->sourcefile~mapl.f90

Source Code

#include "MAPL_ErrLog.h"
module mapl_ServiceServicesTypes
  use ESMF
  use MAPL_ExceptionHandling

  implicit none
  private


!  public ProvidedServiceType
  public ServiceConnectionGet

  type, public :: ProvidedServiceType
!!$      private
     character(len=:), allocatable :: SERVICE_NAME
     character(len=:), allocatable :: BUNDLE_NAME
     type(ESMF_FieldBundle)        :: BUNDLE
     !ALT currect assumption is the bundle for the provider will be in the import state
  end type ProvidedServiceType

  type, public :: RequestedServiceType
!!$      private
     character(len=:), allocatable :: SERVICE_NAME
     !ALT currect assumption is the bundle for the request will be in the export state
     character(len=:), allocatable :: VAR_LIST(:)
     type(ESMF_FieldBundle)        :: BUNDLE
  end type RequestedServiceType

  type, public :: ServiceConnectionType
!!$      private
     character(len=:), allocatable :: SERVICE_NAME
     character(len=:), allocatable :: PROVIDER_NAME
     character(len=:), allocatable :: REQUESTER_NAME
  end type ServiceConnectionType

  interface ProvidedServiceType
     module procedure newProvidedServiceType
  end interface ProvidedServiceType

contains

  function newProvidedServiceType(SERVICE, BUNDLE) result (item)
    character (len=*)             , intent(IN   ) :: SERVICE
    character (len=*)             , intent(IN   ) :: BUNDLE
    
    type (ProvidedServiceType)  :: item
            
    item%Service_name = SERVICE
    item%Bundle_name = BUNDLE
  end function newProvidedServiceType

  subroutine ServiceConnectionGet(item, &
            Service, Provider, Requester, RC)

    type (ServiceConnectionType), intent(IN)  :: ITEM
    character (len=*), optional, intent(  OUT) :: SERVICE
    character (len=*), optional, intent(  OUT) :: PROVIDER
    character (len=*), optional, intent(  OUT) :: REQUESTER
    integer,           optional, intent(  OUT) :: RC     ! Error code:
    
    if (present(Service)) then
       Service = item%Service_name
    end if

    if (present(Provider)) then
       Provider = item%Provider_name
    end if

    if (present(requester)) then
       requester = item%requester_name
    end if

    _RETURN(ESMF_SUCCESS)
  end subroutine ServiceConnectionGet

end module mapl_ServiceServicesTypes