tomlf_type_array Module

Implementation of the TOML array data type.



Interfaces

public interface initialized

Check whether data structure is initialized properly

  • private pure function array_initialized(self) result(okay)

    Check whether data structure is initialized properly

    Arguments

    Type IntentOptional Attributes Name
    type(toml_array), intent(in) :: self

    Instance of the TOML array

    Return Value logical

    Data structure is initialized

public interface len

Overload len function

  • private pure function get_len(self) result(length)

    Get number of TOML values in the array

    Arguments

    Type IntentOptional Attributes Name
    class(toml_array), intent(in) :: self

    Instance of the TOML array

    Return Value integer

    Current length of the array

public interface new

Overloaded constructor for TOML values

  • public subroutine new_array(self)

    Constructor to create a new TOML array and allocate the internal storage

    Arguments

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

    Instance of the TOML array

public interface toml_array

Create standard constructor

  • private function new_array_func() result(self)

    Default constructor for TOML array type

    Arguments

    None

    Return Value type(toml_array)

    Instance of the TOML array


Derived Types

type, public, extends(toml_value) ::  toml_array

TOML array

Components

Type Visibility Attributes Name Initial
logical, public :: inline = .true.

Is an inline array rather than an array of tables

character(kind=tfc, len=:), public, allocatable :: key

Raw representation of the key to the TOML value

integer, public :: origin = 0

Original source of the value

Constructor

Create standard constructor

private function new_array_func ()

Default constructor for TOML array type

Type-Bound Procedures

procedure, public :: accept ../../

Accept a visitor to transverse the data structure

procedure, public :: destroy ../../

Release allocation hold by TOML array

procedure, public :: get ../../

Get the TOML value at a given index

procedure, public :: get_key ../../

Get escaped key to TOML value

procedure, public :: match_key ../../

Compare raw key of TOML value to input key

procedure, public :: pop ../../

Remove the last element from the array

procedure, public :: push_back ../../

Append value to array

procedure, public :: shift ../../

Remove the first element from the array


Subroutines

public subroutine new_array(self)

Constructor to create a new TOML array and allocate the internal storage

Arguments

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

Instance of the TOML array