|
| procedure, public | initialize (this, inunit, iout) |
| | Initialize the block parser.
|
| procedure, public | clear (this) |
| | Close the block parser.
|
| procedure, public | getblock (this, blockname, isfound, ierr, supportopenclose, blockrequired, blocknamefound) |
| | Get block.
|
| procedure, public | getcellid (this, ndim, cellid, flag_string) |
| | Get a cellid.
|
| procedure, public | getcurrentline (this, line) |
| | Get the current line.
|
| procedure, public | getdouble (this) |
| | Get a double precision real.
|
| procedure, public | trygetdouble (this, r, success) |
| procedure, public | getinteger (this) |
| | Get a integer.
|
| procedure, public | trygetinteger (this, i, success) |
| procedure, public | getlinesread (this) |
| | Get the number of lines read.
|
| procedure, public | getnextline (this, endofblock) |
| | Get the next line.
|
| procedure, public | getremainingline (this, line) |
| | Get the rest of a line.
|
| procedure, public | terminateblock (this) |
| | Ensure that the block is closed.
|
| procedure, public | getstring (this, string, converttoupper) |
| | Get a string.
|
| procedure, public | getstringcaps (this, string) |
| | Get an upper case string.
|
| procedure, public | storeerrorunit (this, terminate) |
| | Store the unit number.
|
| procedure, public | getunit (this) |
| | Get the unit number.
|
| procedure, public | devopt (this) |
| | Disable development option in release mode.
|
|
| integer(i4b), private | inunit |
| | file unit number
|
| integer(i4b), private | iuext |
| | external file unit number
|
| integer(i4b), private | iout |
| | listing file unit number
|
| integer(i4b), private | linesread |
| | number of lines read
|
| integer(i4b), private | lloc |
| | line location counter
|
| character(len=linelength), private | blockname |
| | block name
|
| character(len=linelength), private | blocknamefound |
| | block name found
|
| character(len=lenhugeline), private | laststring |
| | last string read
|
| character(len=:), allocatable, private | line |
| | current line
|
Definition at line 23 of file BlockParser.f90.
◆ clear()
| procedure, public blockparsermodule::blockparsertype::clear |
( |
class(blockparsertype), intent(inout) | this | ) |
|
Method to clear the block parser, which closes file(s) and clears member variables.
- Parameters
-
| [in,out] | this | BlockParserType object |
Definition at line 37 of file BlockParser.f90.
◆ devopt()
| procedure, public blockparsermodule::blockparsertype::devopt |
( |
class(blockparsertype), intent(inout) | this | ) |
|
Terminate with an error if in release mode (IDEVELOPMODE = 0). Enables options for development and testing while disabling for public release.
Definition at line 53 of file BlockParser.f90.
◆ getblock()
| procedure, public blockparsermodule::blockparsertype::getblock |
( |
class(blockparsertype), intent(inout) | this, |
|
|
character(len=*), intent(in) | blockname, |
|
|
logical, intent(out) | isfound, |
|
|
integer(i4b), intent(out) | ierr, |
|
|
logical, intent(in), optional | supportopenclose, |
|
|
logical, intent(in), optional | blockrequired, |
|
|
character(len=*), intent(inout), optional | blocknamefound ) |
Method to get the block from a file. The file is read until the blockname is found.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in] | blockname | block name to search for |
| [out] | isfound | boolean indicating if the block name was found |
| [out] | ierr | return error code, 0 indicates block was found |
| [in] | supportopenclose | boolean indicating if the block supports open/close, default false |
| [in] | blockrequired | boolean indicating if the block is required, default true |
| [in,out] | blocknamefound | optional return value of block name found |
Definition at line 38 of file BlockParser.f90.
◆ getcellid()
| procedure, public blockparsermodule::blockparsertype::getcellid |
( |
class(blockparsertype), intent(inout) | this, |
|
|
integer(i4b), intent(in) | ndim, |
|
|
character(len=*), intent(out) | cellid, |
|
|
logical, intent(in), optional | flag_string ) |
Method to get a cellid from a line.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in] | ndim | number of dimensions (1, 2, or 3) |
| [out] | cellid | cell =id |
| [in] | flag_string | boolean indicating id cellid is a string |
Definition at line 39 of file BlockParser.f90.
◆ getcurrentline()
| procedure, public blockparsermodule::blockparsertype::getcurrentline |
( |
class(blockparsertype), intent(inout) | this, |
|
|
character(len=*), intent(out) | line ) |
Method to get the current line.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [out] | line | current line |
Definition at line 40 of file BlockParser.f90.
◆ getdouble()
| procedure, public blockparsermodule::blockparsertype::getdouble |
( |
class(blockparsertype), intent(inout) | this | ) |
|
Function to get adouble precision floating point number from the current line.
- Returns
- double precision real variable
- Parameters
-
| [in,out] | this | BlockParserType object |
Definition at line 41 of file BlockParser.f90.
◆ getinteger()
| procedure, public blockparsermodule::blockparsertype::getinteger |
( |
class(blockparsertype), intent(inout) | this | ) |
|
Function to get a integer from the current line.
- Returns
- integer variable
- Parameters
-
| [in,out] | this | BlockParserType object |
Definition at line 43 of file BlockParser.f90.
◆ getlinesread()
| procedure, public blockparsermodule::blockparsertype::getlinesread |
( |
class(blockparsertype), intent(inout) | this | ) |
|
Function to get the number of lines read from the current block.
- Returns
- number of lines read
- Parameters
-
| [in,out] | this | BlockParserType object |
Definition at line 45 of file BlockParser.f90.
◆ getnextline()
| procedure, public blockparsermodule::blockparsertype::getnextline |
( |
class(blockparsertype), intent(inout) | this, |
|
|
logical, intent(out) | endofblock ) |
Method to get the next line from a file.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [out] | endofblock | boolean indicating if the end of the block was read |
Definition at line 46 of file BlockParser.f90.
◆ getremainingline()
| procedure, public blockparsermodule::blockparsertype::getremainingline |
( |
class(blockparsertype), intent(inout) | this, |
|
|
character(len=:), intent(out), allocatable | line ) |
Method to get the rest of the line from the current line.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [out] | line | remainder of the line |
Definition at line 47 of file BlockParser.f90.
◆ getstring()
| procedure, public blockparsermodule::blockparsertype::getstring |
( |
class(blockparsertype), intent(inout) | this, |
|
|
character(len=*), intent(out) | string, |
|
|
logical, intent(in), optional | converttoupper ) |
Method to get a string from the current line and optionally convert it to upper case.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in] | converttoupper | boolean indicating if the string should be converted to upper case, default false |
Definition at line 49 of file BlockParser.f90.
◆ getstringcaps()
| procedure, public blockparsermodule::blockparsertype::getstringcaps |
( |
class(blockparsertype), intent(inout) | this, |
|
|
character(len=*), intent(out) | string ) |
Method to get a string from the current line and convert it to upper case.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [out] | string | upper case string |
Definition at line 50 of file BlockParser.f90.
◆ getunit()
| procedure, public blockparsermodule::blockparsertype::getunit |
( |
class(blockparsertype), intent(inout) | this | ) |
|
Function to get the unit number for the block parser.
- Returns
- unit number for the block parser
- Parameters
-
| [in,out] | this | BlockParserType object |
Definition at line 52 of file BlockParser.f90.
◆ initialize()
| procedure, public blockparsermodule::blockparsertype::initialize |
( |
class(blockparsertype), intent(inout) | this, |
|
|
integer(i4b), intent(in) | inunit, |
|
|
integer(i4b), intent(in) | iout ) |
Method to initialize the block parser.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in] | inunit | input file unit number |
| [in] | iout | listing file unit number |
Definition at line 36 of file BlockParser.f90.
◆ readscalarerror()
| procedure, private blockparsermodule::blockparsertype::readscalarerror |
( |
class(blockparsertype), intent(inout) | this, |
|
|
character(len=*), intent(in) | vartype ) |
|
private |
Method to issue an unable to read error.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in] | vartype | string of variable type |
Definition at line 54 of file BlockParser.f90.
◆ storeerrorunit()
| procedure, public blockparsermodule::blockparsertype::storeerrorunit |
( |
class(blockparsertype), intent(inout) | this, |
|
|
logical, intent(in), optional | terminate ) |
Method to store the unit number for the file that caused a read error. Default is to terminate the simulation when this method is called.
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in] | terminate | boolean indicating if the simulation should be terminated |
Definition at line 51 of file BlockParser.f90.
◆ terminateblock()
| procedure, public blockparsermodule::blockparsertype::terminateblock |
( |
class(blockparsertype), intent(inout) | this | ) |
|
Method to ensure that the block is closed with an "end".
- Parameters
-
| [in,out] | this | BlockParserType object |
Definition at line 48 of file BlockParser.f90.
◆ trygetdouble()
| procedure, public blockparsermodule::blockparsertype::trygetdouble |
( |
class(blockparsertype), intent(inout) | this, |
|
|
real(dp), intent(inout) | r, |
|
|
logical(lgp), intent(inout) | success ) |
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in,out] | r | double precision real variable |
| [in,out] | success | whether parsing was successful |
Definition at line 42 of file BlockParser.f90.
◆ trygetinteger()
| procedure, public blockparsermodule::blockparsertype::trygetinteger |
( |
class(blockparsertype), intent(inout) | this, |
|
|
integer(i4b), intent(inout) | i, |
|
|
logical(lgp), intent(inout) | success ) |
- Parameters
-
| [in,out] | this | BlockParserType object |
| [in,out] | i | integer variable |
| [in,out] | success | whether parsing was successful |
Definition at line 44 of file BlockParser.f90.
◆ blockname
| character(len=linelength), private blockparsermodule::blockparsertype::blockname |
|
private |
Definition at line 30 of file BlockParser.f90.
30 character(len=LINELENGTH), private :: blockName
◆ blocknamefound
| character(len=linelength), private blockparsermodule::blockparsertype::blocknamefound |
|
private |
Definition at line 31 of file BlockParser.f90.
31 character(len=LINELENGTH), private :: blockNameFound
◆ inunit
| integer(i4b), private blockparsermodule::blockparsertype::inunit |
|
private |
◆ iout
| integer(i4b), private blockparsermodule::blockparsertype::iout |
|
private |
◆ iuactive
| integer(i4b), public blockparsermodule::blockparsertype::iuactive |
◆ iuext
| integer(i4b), private blockparsermodule::blockparsertype::iuext |
|
private |
◆ laststring
| character(len=lenhugeline), private blockparsermodule::blockparsertype::laststring |
|
private |
Definition at line 32 of file BlockParser.f90.
32 character(len=LENHUGELINE), private :: laststring
◆ line
| character(len=:), allocatable, private blockparsermodule::blockparsertype::line |
|
private |
Definition at line 33 of file BlockParser.f90.
33 character(len=:), allocatable, private :: line
◆ line_reader
Definition at line 34 of file BlockParser.f90.
34 type(LongLineReaderType) :: line_reader
◆ linesread
| integer(i4b), private blockparsermodule::blockparsertype::linesread |
|
private |
◆ lloc
| integer(i4b), private blockparsermodule::blockparsertype::lloc |
|
private |
The documentation for this type was generated from the following file: