Implementation of a basic storage structure as pointer list of pointers.
This implementation does purposely not use pointer attributes in the datastructure to make it safer to work with.
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 |
procedure, public :: destroy | ../../ Destroy the data structure |
procedure, public :: get | ../../ Get TOML value at a given index |
procedure, public :: get_len | ../../ Get number of TOML values in the structure |
procedure, public :: pop | ../../ Remove the last element from the structure |
procedure, public :: push_back | ../../ Push back a TOML value to the structure |
procedure, public :: shift | ../../ Remove the first element from the structure |
Constructor for the storage data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(toml_array_list), | intent(out) | :: | self |
Instance of the structure |
||
integer, | intent(in), | optional | :: | n |
Initial storage capacity |