tomlf_build_keyval Module

Functions to build a TOML values

The build module defines an interface to work with TOML values instead of accessing the raw value directly. Both setter and getter routines defined here are rarely needed in any user context, but serve as a basic building block to define uniform access methods for TOML tables and arrays.



Interfaces

public interface get_value

Getter functions to manipulate TOML values

  • private subroutine get_value_float_sp(self, val, stat, origin)

    Retrieve TOML value as single precision float (might lose accuracy)

    Arguments

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

    Instance of the key-value pair

    real(kind=tf_sp), intent(out) :: val

    Real value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_float_dp(self, val, stat, origin)

    Retrieve TOML value as double precision float

    Arguments

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

    Instance of the key-value pair

    real(kind=tf_dp), intent(out) :: val

    Real value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_integer_i1(self, val, stat, origin)

    Retrieve TOML value as one byte integer (might loose precision)

    Arguments

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

    Instance of the key-value pair

    integer(kind=tf_i1), intent(out) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_integer_i2(self, val, stat, origin)

    Retrieve TOML value as two byte integer (might loose precision)

    Arguments

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

    Instance of the key-value pair

    integer(kind=tf_i2), intent(out) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_integer_i4(self, val, stat, origin)

    Retrieve TOML value as four byte integer (might loose precision)

    Arguments

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

    Instance of the key-value pair

    integer(kind=tf_i4), intent(out) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_integer_i8(self, val, stat, origin)

    Retrieve TOML value as eight byte integer

    Arguments

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

    Instance of the key-value pair

    integer(kind=tf_i8), intent(out) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_bool(self, val, stat, origin)

    Retrieve TOML value as logical

    Arguments

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

    Instance of the key-value pair

    logical, intent(out) :: val

    Boolean value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_datetime(self, val, stat, origin)

    Retrieve TOML value as datetime

    Arguments

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

    Instance of the key-value pair

    type(toml_datetime), intent(out) :: val

    Datetime value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine get_value_string(self, val, stat, origin)

    Retrieve TOML value as deferred-length character

    Arguments

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

    Instance of the key-value pair

    character(kind=tfc, len=:), intent(out), allocatable :: val

    String value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

public interface set_value

Setter functions to manipulate TOML values

  • private subroutine set_value_float_sp(self, val, stat, origin)

    Set TOML value to single precision float

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    real(kind=tf_sp), intent(in) :: val

    Real value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_float_dp(self, val, stat, origin)

    Set TOML value to double precision float

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    real(kind=tf_dp), intent(in) :: val

    Real value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_integer_i1(self, val, stat, origin)

    Set TOML value to one byte integer

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    integer(kind=tf_i1), intent(in) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_integer_i2(self, val, stat, origin)

    Set TOML value to two byte integer

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    integer(kind=tf_i2), intent(in) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_integer_i4(self, val, stat, origin)

    Set TOML value to four byte integer

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    integer(kind=tf_i4), intent(in) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_integer_i8(self, val, stat, origin)

    Set TOML value to eight byte integer

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    integer(kind=tf_i8), intent(in) :: val

    Integer value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_bool(self, val, stat, origin)

    Set TOML value to logical

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    logical, intent(in) :: val

    Boolean value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_datetime(self, val, stat, origin)

    Set TOML value to datetime

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    type(toml_datetime), intent(in) :: val

    Datetime value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure

  • private subroutine set_value_string(self, val, stat, origin)

    Set TOML value to deferred-length character

    Arguments

    Type IntentOptional Attributes Name
    class(toml_keyval), intent(inout) :: self

    Instance of the key-value pair

    character(kind=tfc, len=*), intent(in) :: val

    String value

    integer, intent(out), optional :: stat

    Status of operation

    integer, intent(out), optional :: origin

    Origin in the data structure