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 |
Destroy the data structure
Deconstructor for data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array_list), | intent(inout), | target | :: | self |
Instance of the structure |
Get TOML value at a given index
Get TOML value at a given index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array_list), | intent(inout), | target | :: | self |
Instance of the structure |
|
integer, | intent(in) | :: | idx |
Position in the ordered structure |
||
class(toml_value), | intent(out), | pointer | :: | ptr |
Pointer to the stored value at given index |
Get number of TOML values in the structure
Get number of TOML values in the structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array_list), | intent(in), | target | :: | self |
Instance of the structure |
Current length of the ordered structure
Remove the last element from the structure
Remove the last element from the data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array_list), | intent(inout), | target | :: | self |
Instance of the structure |
|
class(toml_value), | intent(out), | allocatable | :: | val |
TOML value to be retrieved |
Push back a TOML value to the structure
Push back a TOML value to the structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array_list), | intent(inout), | target | :: | self |
Instance of the structure |
|
class(toml_value), | intent(inout), | allocatable | :: | val |
TOML value to be stored |
Remove the first element from the structure
Remove the first element from the data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array_list), | intent(inout), | target | :: | self |
Instance of the structure |
|
class(toml_value), | intent(out), | allocatable | :: | val |
TOML value to be retrieved |
type, extends(toml_list_structure) :: toml_array_list !> Current number of stored TOML values integer :: n = 0 !> List of TOML values type(toml_node), allocatable :: lst(:) contains !> Get number of TOML values in the structure procedure :: get_len !> Get TOML value at a given index procedure :: get !> Push back a TOML value to the structure procedure :: push_back !> Remove the first element from the structure procedure :: shift !> Remove the last element from the structure procedure :: pop !> Destroy the data structure procedure :: destroy end type toml_array_list