Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | ErrorsFound |
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.
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 ProcessDataDicFile(ErrorsFound)
! SUBROUTINE INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN August 1997
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine processes data dictionary file for EnergyPlus.
! The structure of the sections and objects are stored in derived
! types (SectionDefs and ObjectDefs)
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
LOGICAL, INTENT(INOUT) :: ErrorsFound ! set to true if any errors flagged during IDD processing
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
LOGICAL :: EndofFile = .false. ! True when End of File has been reached (IDD or IDF)
INTEGER Pos ! Test of scanning position on the current input line
TYPE (SectionsDefinition), ALLOCATABLE :: TempSectionDef(:) ! Like SectionDef, used during Re-allocation
TYPE (ObjectsDefinition), ALLOCATABLE :: TempObjectDef(:) ! Like ObjectDef, used during Re-allocation
LOGICAL BlankLine
MaxSectionDefs=SectionDefAllocInc
MaxObjectDefs=ObjectDefAllocInc
ALLOCATE (SectionDef(MaxSectionDefs))
ALLOCATE(ObjectDef(MaxObjectDefs))
NumObjectDefs=0
NumSectionDefs=0
EndofFile=.false.
! Read/process first line (Version info)
DO WHILE (.not. EndofFile)
CALL ReadInputLine(IDDFile,Pos,BlankLine,InputLineLength,EndofFile)
IF (EndofFile) CYCLE
Pos=INDEX(InputLine,'!IDD_Version')
IF (Pos /= 0) THEN
IDDVerString=InputLine(2:LEN_TRIM(InputLine))
ENDIF
EXIT
ENDDO
DO WHILE (.not. EndofFile)
CALL ReadInputLine(IDDFile,Pos,BlankLine,InputLineLength,EndofFile)
IF (BlankLine .or. EndofFile) CYCLE
Pos=SCAN(InputLine(1:InputLineLength),',;')
If (Pos /= 0) then
If (InputLine(Pos:Pos) == ';') then
CALL AddSectionDef(InputLine(1:Pos-1),ErrorsFound)
IF (NumSectionDefs == MaxSectionDefs) THEN
ALLOCATE (TempSectionDef(MaxSectionDefs+SectionDefAllocInc))
TempSectionDef(1:MaxSectionDefs)=SectionDef
DEALLOCATE (SectionDef)
ALLOCATE (SectionDef(MaxSectionDefs+SectionDefAllocInc))
SectionDef=TempSectionDef
DEALLOCATE (TempSectionDef)
MaxSectionDefs=MaxSectionDefs+SectionDefAllocInc
ENDIF
else
CALL AddObjectDefandParse(InputLine(1:Pos-1),Pos,EndofFile,ErrorsFound)
IF (NumObjectDefs == MaxObjectDefs) THEN
ALLOCATE (TempObjectDef(MaxObjectDefs+ObjectDefAllocInc))
TempObjectDef(1:MaxObjectDefs)=ObjectDef
DEALLOCATE (ObjectDef)
ALLOCATE (ObjectDef(MaxObjectDefs+ObjectDefAllocInc))
ObjectDef=TempObjectDef
DEALLOCATE (TempObjectDef)
MaxObjectDefs=MaxObjectDefs+ObjectDefAllocInc
ENDIF
endif
else
CALL ShowSevereError('IP: IDD line~'//TRIM(IPTrimSigDigits(NumLines))//' , or ; expected on this line',EchoInputFile)
ErrorsFound=.true.
endif
END DO
RETURN
END SUBROUTINE ProcessDataDicFile