Library to parse yaml input files
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(type_node), | public, | pointer | :: | root | => | null() |
top level (main) access to the tree |
| type(YamlFile), | public | :: | file |
used only for top level config |
|||
| type(type_dictionary), | public | :: | cmp_by_type |
dictionary with arrays of components |
|||
| type(input_t), | public, | pointer | :: | cmp_arr(:) | => | null() |
array of components of the same type |
| procedure, public :: open => input_open_yaml | Open and parse file and return as input dictionary |
| procedure, public :: dict => input_dict | Get input sub-dictionary |
| procedure, public :: dict1d => input_dict1d | Get allocatable array of input sub-dictionaries |
| procedure, public :: dbl => input_dbl | Get 'real' double precision value |
| procedure, public :: dbl1d => input_dbl1d | Get 'real' double precision allocatable one dimension array |
| procedure, public :: dbl2d => input_dbl2d | Get 'real' double precision allocatable two dimensional array |
| procedure, public :: bin => input_bin | Get 'logical' value like: true/false yes/no etc... |
| procedure, public :: bin1d => input_bin1d | Get 'logical' 1d array of values of true/false yes/no etc... |
| procedure, public :: int => input_int | Get 'integer' value |
| procedure, public :: int1d => input_int1d | Get 'integer' value |
| procedure, public :: str => input_str | Get allocatable trimmed 'character(:)' value |
| procedure, public :: str1d => input_str1d | Get allocatable trimmed 'character(:)' value |
| procedure, public :: cmp1d => input_cmp1d | Get pointer to array of input components |
| procedure, public :: nb_cmp => input_nb_cmp | Get total number of components |
| procedure, public :: has_key => input_has_key | Return true if dictionary has a key |
| procedure, public :: keys1d => input_keys1d | Return 1d array of keys |
| procedure, public :: node => input_node | Get "type_node" from yaml lib |
| procedure, public :: dump => input_dump_dict |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(in), | optional | :: | filter_key | ||
| character(len=*), | intent(in), | optional | :: | filter_value | ||
| logical, | intent(in), | optional | :: | empty |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(in), | optional | :: | filter_key | ||
| character(len=*), | intent(in), | optional | :: | filter_value | ||
| logical, | intent(in), | optional | :: | empty |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=dp), | intent(in), | optional | :: | default_value(:,:) |
default value in case of missing key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| real(kind=dp), | intent(in), | optional | :: | default_value(:) |
default value in case of missing key |
|
| integer, | intent(in), | optional | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(input_t), | intent(in) | :: | dict | |||
| integer, | intent(inout), | allocatable | :: | val(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(in), | optional | :: | default_value(:) |
default value in case of missing key |
|
| integer, | intent(in), | optional | :: | n |
expected number of elements in the array (can be used broadcast scalar to array) |
Function returns double value given by the key and stops if key doesn't exist.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key |
key to the value in dictionary |
||
| real(kind=dp), | intent(in), | optional | :: | default_value |
default value in case of missing key |
returned value
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| character(len=*), | intent(in), | optional | :: | default_value |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(in), | optional | :: | default_value |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| logical, | intent(in), | optional | :: | default_value(:) |
default value in case of missing key |
|
| integer, | intent(in), | optional | :: | n |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key | |||
| integer, | intent(in), | optional | :: | default_value |
take node and return dictionary, if it's not dictionary it's stops
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(type_node), | intent(in), | pointer | :: | me |
take node and return list, if it's not list it's stops
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(type_node), | intent(in), | pointer | :: | me |
take node and return scalar, if it's not scalar it's stops
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(type_node), | intent(in), | pointer | :: | me |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(type_dictionary), | intent(inout) | :: | dict | |||
| character(len=*), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | me | |||
| character(len=*), | intent(in) | :: | key |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | cfg | |||
| real(kind=dp), | intent(inout) | :: | sig |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | cfg | |||
| real(kind=dp), | intent(inout), | allocatable | :: | sig(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | cfg | |||
| real(kind=dp), | allocatable | :: | sig(:,:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(inout) | :: | me | |||
| character(len=*), | intent(in) | :: | file_name | |||
| logical, | intent(in), | optional | :: | included |
ignore it - only present for included files |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(input_t), | intent(in) | :: | self | |||
| integer, | intent(in) | :: | unit | |||
| integer, | intent(in) | :: | indent |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(type_error), | intent(in), | allocatable | :: | err | ||
| character(len=*), | optional | :: | complementary_message |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(type_scalar), | intent(in) | :: | element | |||
| logical, | intent(in) | :: | ok |
returns sub-dictionary by traversing from top level dictionary using key separation sign: '/'
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(type_dictionary), | intent(inout), | pointer | :: | dict | ||
| character(len=*), | intent(inout) | :: | key |
Scanning all nodes in yaml tree and attaching to them external files It also implementing dictionary key marge operator "<<"
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(type_node), | intent(inout) | :: | me | |||
| character(len=*), | intent(inout) | :: | folder | |||
| class(type_key_value_pair), | intent(inout), | optional | :: | dict_item | ||
| class(type_list_item), | intent(inout), | optional | :: | list_item |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(type_node), | intent(inout), | pointer | :: | cmp_tree | ||
| type(type_dictionary), | intent(inout) | :: | no_cmp | |||
| character(len=*), | intent(in) | :: | prefix | |||
| character(len=*), | intent(in) | :: | postfix |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(input_t), | intent(inout) | :: | me | |||
| type(type_dictionary), | intent(inout) | :: | no_cmp |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(input_t), | intent(inout) | :: | me | |||
| class(type_node), | intent(in), | pointer | :: | tree | ||
| type(type_dictionary), | intent(inout) | :: | no_cmp |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(type_dictionary), | intent(inout) | :: | cmp | |||
| character(len=*), | intent(in) | :: | prefix | |||
| character(len=*), | intent(in) | :: | postfix |