Stores TOML values in a list of pointers
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(toml_node), | public, | allocatable | :: | lst(:) |
List of TOML values |
||
integer, | public | :: | n | = | 0 |
Current number of stored TOML values |
Delete TOML value at a given key
Delete TOML value at a given key
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_ordered_map), | intent(inout), | target | :: | self |
Instance of the structure |
|
character(kind=tfc, len=*), | intent(in) | :: | key |
Key to the TOML value |
Destroy the data structure
Deconstructor for data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_ordered_map), | intent(inout), | target | :: | self |
Instance of the structure |
Get TOML value at a given key
Get TOML value at a given key
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_ordered_map), | intent(inout), | target | :: | self |
Instance of the structure |
|
character(kind=tfc, len=*), | intent(in) | :: | key |
Key to the TOML value |
||
class(toml_value), | intent(out), | pointer | :: | ptr |
Pointer to the stored value at given key |
Get list of all keys in the structure
Get list of all keys in the structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_ordered_map), | intent(inout), | target | :: | self |
Instance of the structure |
|
type(toml_key), | intent(out), | allocatable | :: | list(:) |
List of all keys |
Remove TOML value at a given key and return it
Remove TOML value at a given key and return it
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_ordered_map), | intent(inout), | target | :: | self |
Instance of the structure |
|
character(kind=tfc, len=*), | intent(in) | :: | key |
Key to the TOML value |
||
class(toml_value), | intent(out), | allocatable | :: | val |
Removed TOML value |
Push back a TOML value to the structure
Push back a TOML value to the structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_ordered_map), | intent(inout), | target | :: | self |
Instance of the structure |
|
class(toml_value), | intent(inout), | allocatable | :: | val |
TOML value to be stored |
type, extends(toml_map_structure) :: toml_ordered_map !> Current number of stored TOML values integer :: n = 0 !> List of TOML values type(toml_node), allocatable :: lst(:) contains !> Get TOML value at a given key procedure :: get !> Push back a TOML value to the structure procedure :: push_back !> Remove TOML value at a given key and return it procedure :: pop !> Get list of all keys in the structure procedure :: get_keys !> Delete TOML value at a given key procedure :: delete !> Destroy the data structure procedure :: destroy end type toml_ordered_map