Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | calledFrom | |||
character(len=*), | intent(in) | :: | CurrentObject | |||
character(len=*), | intent(in) | :: | ZoneName | |||
integer, | intent(in) | :: | MaxZoneNameLength | |||
character(len=*), | intent(in) | :: | ItemName | |||
character(len=*), | intent(in), | DIMENSION(:) | :: | ItemNames | ||
integer, | intent(in) | :: | NumItems | |||
character(len=*), | intent(inout) | :: | ResultName | |||
logical, | intent(inout) | :: | ErrFlag |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE CheckCreatedZoneItemName(calledFrom,CurrentObject,ZoneName,MaxZoneNameLength,ItemName, &
ItemNames,NumItems,ResultName,ErrFlag)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN December 2012
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine checks "global" objects (that is, ones with ZoneList used in the name
! specification) along with a specific name for the current object for length and duplication
! with previous objects of that class.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE DataGlobals, ONLY: MaxNameLength
USE DataInterfaces, ONLY: ShowWarningError,ShowSevereError,ShowContinueError
USE InputProcessor, ONLY: FindItemInList
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: calledFrom ! routine called from
CHARACTER(len=*), INTENT(IN) :: CurrentObject ! object being parsed
CHARACTER(len=*), INTENT(IN) :: ZoneName ! Zone Name associated
INTEGER, INTENT(IN) :: MaxZoneNameLength ! maximum length of zonelist zone names
CHARACTER(len=*), INTENT(IN) :: ItemName ! Item name (People, Lights, etc object)
CHARACTER(len=*), DIMENSION(:), INTENT(IN) :: ItemNames ! Item Names to check for duplication
INTEGER, INTENT(IN) :: NumItems ! Number of items in ItemNames array
CHARACTER(len=*), INTENT(INOUT) :: ResultName ! Resultant name
LOGICAL, INTENT(INOUT) :: ErrFlag ! Error flag set to true if error found here.
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: ItemLength
LOGICAL :: DuplicateNameError
INTEGER :: FoundItem
INTEGER :: ItemNameLength
LOGICAL :: TooLong
ErrFlag=.false.
DuplicateNameError=.false.
ItemNameLength=len_trim(ItemName)
ItemLength=len_trim(ZoneName) + ItemNameLength
ResultName=trim(ZoneName)//' '//ItemName
TooLong=.false.
IF (ItemLength > MaxNameLength) THEN
CALL ShowWarningError(calledFrom//trim(CurrentObject)//' Combination of ZoneList and Object Name generate a name too long.')
CALL ShowContinueError('Object Name="'//trim(ItemName)//'".')
CALL ShowContinueError('ZoneList/Zone Name="'//trim(ZoneName)//'".')
CALL ShowContinueError('Item length=['//trim(RoundSigDigits(ItemLength))//'] > Maximum Length=['// &
trim(RoundSigDigits(MaxNameLength))//']. You may need to shorten the names.')
CALL ShowContinueError('Shortening the Object Name by ['// &
trim(RoundSigDigits((MaxZoneNameLength+1+ItemNameLength)-MaxNameLength))// &
'] characters will assure uniqueness for this ZoneList.')
CALL ShowContinueError('name that will be used (may be needed in reporting)="'//trim(ResultName)//'".')
TooLong=.true.
ENDIF
FoundItem=FindItemInList(ResultName,ItemNames,NumItems)
IF (FoundItem /= 0) THEN
CALL ShowSevereError(calledFrom//trim(CurrentObject)//'="'//trim(ItemName)//'", Duplicate Generated name encountered.')
CALL ShowContinueError('name="'//trim(ResultName)//'" has already been generated or entered as '// &
trim(CurrentObject)//' item=['//trim(RoundSigDigits(FoundItem))//'].')
IF (TooLong) CALL ShowContinueError('Duplicate name likely caused by the previous "too long" warning.')
ResultName='xxxxxxx'
ErrFlag=.true.
ENDIF
RETURN
END SUBROUTINE CheckCreatedZoneItemName