RequestedServiceGet Subroutine

public subroutine RequestedServiceGet(request_list, service, bundle, rc)

Arguments

Type IntentOptional Attributes Name
type(requestedServiceItemVector), intent(in) :: request_list
character(len=*), intent(in) :: service
type(ESMF_FieldBundle), intent(out) :: bundle
integer, intent(out), optional :: rc

Calls

proc~~requestedserviceget~~CallsGraph proc~requestedserviceget RequestedServiceGet interface~mapl_assert MAPL_Assert proc~requestedserviceget->interface~mapl_assert none~begin~82 requestedServiceItemVector%begin proc~requestedserviceget->none~begin~82 none~get~168 requestedServiceItemVectorIterator%get proc~requestedserviceget->none~get~168 proc~mapl_return MAPL_Return proc~requestedserviceget->proc~mapl_return 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

Called by

proc~~requestedserviceget~~CalledByGraph proc~requestedserviceget RequestedServiceGet proc~mapl_genericinitialize MAPL_GenericInitialize proc~mapl_genericinitialize->proc~requestedserviceget

Source Code

  subroutine RequestedServiceGet(request_list, service, bundle, rc)
    type(RequestedServiceItemVector), intent(IN) :: request_list
    character(len=*), intent(IN) :: service
    type(ESMF_FieldBundle), intent(OUT) :: bundle
    integer, optional, intent(out) :: rc
    
    logical :: found
    type (RequestedServiceItemVectorIterator) :: iter
    type (RequestedServiceType), pointer :: item
    
    _ASSERT(request_list%size()>0,'request_list should not be empty')
    
    found = .false.
    iter = request_list%begin()
    ! loop over requested services
    do while (iter /= request_list%end())
       item => iter%get()
       if(item%service_name == service) then
          found = .true.
          bundle = item%bundle
          exit
       end if
    END DO
    _ASSERT(found, 'No match found for service')
    _RETURN(_SUCCESS)
  end subroutine RequestedServiceGet