Merge TOML data structures, the merge policy can be adjusted.
Note that the context information cannot be preserved.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(enum_policy), | public, | parameter | :: | merge_policy | = | enum_policy() |
Actual enumerator for merging data structures |
Constructor for merge configuration
Create a new merge configuration
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in), | optional | :: | table |
Policy for merging tables |
|
character(len=*), | intent(in), | optional | :: | array |
Policy for merging arrays |
|
character(len=*), | intent(in), | optional | :: | keyval |
Policy for merging values |
Merge policy
Configuration for merging data structures
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | array | = | merge_policy%preserve |
Policy for merging arrays |
|
integer, | public | :: | keyval | = | merge_policy%preserve |
Policy for merging values |
|
integer, | public | :: | table | = | merge_policy%append |
Policy for merging tables |
Constructor for merge configuration
private pure function new_merge_config (table, array, keyval) | Create a new merge configuration |
Append values from one TOML array to another
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array), | intent(inout) | :: | lhs |
Instance of array to merge into |
||
class(toml_array), | intent(inout) | :: | rhs |
Instance of array to be merged |
Merge TOML tables by appending their values
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_table), | intent(inout) | :: | lhs |
Instance of table to merge into |
||
class(toml_table), | intent(inout) | :: | rhs |
Instance of table to be merged |
||
type(toml_merge_config), | intent(in), | optional | :: | config |
Merge policy |