Type represents a parser that can be used to get information from an input file
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(entry_obj), | public, | allocatable | :: | entries(:) |
Entries in an input file |
Finalization routine
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
Read value: 0D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
character(len=*), | intent(in) | :: | label |
Label |
||
class(*), | intent(out) | :: | value |
Value to return |
||
class(*), | intent(in), | optional | :: | default |
Default value to return in case label is not found |
Read value: 1D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
character(len=*), | intent(in) | :: | label |
Label |
||
class(*), | intent(out) | :: | value(:) |
Value to return |
||
class(*), | intent(in), | optional | :: | default(:) |
Default value to return in case label is not found |
Initialization the praser
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
Check whether the field is defined
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
character(len=*), | intent(in) | :: | label |
label to look for |
Read & parse the input file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
character(len=*), | intent(in), | optional | :: | optInput |
Optional input file name |
Prints all variables found in the parsed file
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
Resize entries array to add a new entry
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
type(entry_obj), | intent(in) | :: | entry |
New entrysize |
Assing default to value: 0D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(out) | :: | value |
Value to return |
||
class(*), | intent(in) | :: | default |
Default value to return in case label is not found |
Assing default to value: 1D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(out) | :: | value(:) |
Value to return |
||
class(*), | intent(in) | :: | default(:) |
Default value to return in case label is not found |
Return ID of label in the array of entries Returns 0 if label not found.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(in) | :: | this |
Parser object |
||
character(len=*), | intent(in) | :: | label |
label to look for |
Parse a line
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
character(len=MAX_LINE_SIZE), | intent(inout) | :: | line |
A line from the input file |
Assing default to value: 0D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(out) | :: | value |
Value to return |
||
class(*), | intent(in) | :: | default |
Default value to return in case label is not found |
Assing default to value: 1D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(*), | intent(out) | :: | value(:) |
Value to return |
||
class(*), | intent(in) | :: | default(:) |
Default value to return in case label is not found |
Parse a line
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=MAX_LINE_SIZE), | intent(inout) | :: | line |
A line from the input file |
Read value: 0D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
character(len=*), | intent(in) | :: | label |
Label |
||
class(*), | intent(out) | :: | value |
Value to return |
||
class(*), | intent(in), | optional | :: | default |
Default value to return in case label is not found |
Read value: 1D version
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parser_obj), | intent(inout) | :: | this |
Parser object |
||
character(len=*), | intent(in) | :: | label |
Label |
||
class(*), | intent(out) | :: | value(:) |
Value to return |
||
class(*), | intent(in), | optional | :: | default(:) |
Default value to return in case label is not found |