parse_item_common Subroutine

public subroutine parse_item_common(item, item_name, expression, rc)

Arguments

Type IntentOptional Attributes Name
type(ESMF_HConfigIter), intent(in) :: item
character(len=:), intent(out), allocatable :: item_name
character(len=:), intent(out), allocatable :: expression
integer, intent(out), optional :: rc

Calls

proc~~parse_item_common~~CallsGraph proc~parse_item_common parse_item_common ESMF_HConfigAsStringMapKey ESMF_HConfigAsStringMapKey proc~parse_item_common->ESMF_HConfigAsStringMapKey ESMF_HConfigCreateAtMapVal ESMF_HConfigCreateAtMapVal proc~parse_item_common->ESMF_HConfigCreateAtMapVal ESMF_HConfigIsMapMapVal ESMF_HConfigIsMapMapVal proc~parse_item_common->ESMF_HConfigIsMapMapVal ESMF_HConfigIsScalarMapKey ESMF_HConfigIsScalarMapKey proc~parse_item_common->ESMF_HConfigIsScalarMapKey esmf_hconfigasstring esmf_hconfigasstring proc~parse_item_common->esmf_hconfigasstring interface~mapl_assert MAPL_Assert proc~parse_item_common->interface~mapl_assert proc~mapl_return MAPL_Return proc~parse_item_common->proc~mapl_return proc~mapl_verify MAPL_Verify proc~parse_item_common->proc~mapl_verify 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

Called by

proc~~parse_item_common~~CalledByGraph proc~parse_item_common parse_item_common proc~test_parse_item_common test_parse_item_common proc~test_parse_item_common->proc~parse_item_common

Source Code

   subroutine parse_item_common(item, item_name, expression, rc)
      type(ESMF_HConfigIter), intent(in) :: item
      character(len=:), allocatable, intent(out) :: item_name
      character(len=:), allocatable, intent(out) :: expression
      integer, optional, intent(out) :: rc
      character(len=*), parameter :: EXPRESSION_KEY = 'expr'
      integer :: status
      logical :: asOK, isScalar, isMap
      type(ESMF_HConfig) :: value

      isScalar = ESMF_HConfigIsScalarMapKey(item, _RC)
      _ASSERT(isScalar, 'Variable list item does not have a scalar name.')
      isMap = ESMF_HConfigIsMapMapVal(item, _RC)
      _ASSERT(isMap, 'Variable list item does not have a map value.')

      item_name = ESMF_HConfigAsStringMapKey(item, asOkay=asOK, _RC)
      _ASSERT(asOK, 'Item name could not be processed as a String.')

      value = ESMF_HConfigCreateAtMapVal(item, _RC)
      expression = ESMF_HConfigAsString(value, keyString=EXPRESSION_KEY, _RC)

      _RETURN(_SUCCESS)
   end subroutine parse_item_common