tomlf_structure_ordered_map 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_map_structure) ::  toml_ordered_map

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 :: delete

Delete TOML value at a given key

procedure, public :: destroy

Destroy the data structure

procedure, public :: get

Get TOML value at a given key

procedure, public :: get_keys

Get list of all keys in the structure

procedure, public :: pop

Remove TOML value at a given key and return it

procedure, public :: push_back

Push back a TOML value to the structure


Subroutines

public subroutine new_ordered_map(self, n)

Constructor for the storage data structure

Arguments

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

Instance of the structure

integer, intent(in), optional :: n

Initial storage capacity