tomlf_structure_array_list Module

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.



Derived Types

type, public, extends(toml_list_structure) ::  toml_array_list

Stores TOML values in a list of pointers

Components

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

Type-Bound Procedures

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


Subroutines

public subroutine new_array_list(self, n)

Constructor for the storage data structure

Arguments

Type IntentOptional Attributes Name
type(toml_array_list), intent(out) :: self

Instance of the structure

integer, intent(in), optional :: n

Initial storage capacity