get_value Interface

public interface get_value

Getter functions to manipulate TOML tables


Module Procedures

private subroutine get_child_table(table, key, ptr, requested, stat, origin)

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

type(toml_table), intent(out), pointer :: ptr

Pointer to child table

logical, intent(in), optional :: requested

Child value must be present

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_array(table, key, ptr, requested, stat, origin)

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

type(toml_array), intent(out), pointer :: ptr

Pointer to child array

logical, intent(in), optional :: requested

Child value must be present

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_keyval(table, key, ptr, requested, stat, origin)

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

type(toml_keyval), intent(out), pointer :: ptr

Pointer to child value

logical, intent(in), optional :: requested

Child value must be present

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_float_sp(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

Real value

real(kind=tf_sp), intent(in), optional :: default

Default real value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_float_dp(table, key, val, default, stat, origin)

Retrieve TOML value as double precision float

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

Real value

real(kind=tf_dp), intent(in), optional :: default

Default real value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_integer_i1(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

Integer value

integer(kind=tf_i1), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_integer_i2(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

Integer value

integer(kind=tf_i2), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_integer_i4(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

Integer value

integer(kind=tf_i4), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_integer_i8(table, key, val, default, stat, origin)

Retrieve TOML value as eight byte integer

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

Integer value

integer(kind=tf_i8), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_bool(table, key, val, default, stat, origin)

Retrieve TOML value as logical

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

logical, intent(out) :: val

Boolean value

logical, intent(in), optional :: default

Default boolean value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_datetime(table, key, val, default, stat, origin)

Retrieve TOML value as datetime

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

Datetime value

type(toml_datetime), intent(in), optional :: default

Default datetime value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_child_value_string(table, key, val, default, stat, origin)

Retrieve TOML value as deferred-length character

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

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

Key in this TOML table

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

String value

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

Default string value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_table(table, key, ptr, requested, stat, origin)

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

type(toml_table), intent(out), pointer :: ptr

Pointer to child table

logical, intent(in), optional :: requested

Child value must be present

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_array(table, key, ptr, requested, stat, origin)

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

type(toml_array), intent(out), pointer :: ptr

Pointer to child array

logical, intent(in), optional :: requested

Child value must be present

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_keyval(table, key, ptr, requested, stat, origin)

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

type(toml_keyval), intent(out), pointer :: ptr

Pointer to child value

logical, intent(in), optional :: requested

Child value must be present

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_float_sp(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

Real value

real(kind=tf_sp), intent(in), optional :: default

Default real value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_float_dp(table, key, val, default, stat, origin)

Retrieve TOML value as double precision float

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

Real value

real(kind=tf_dp), intent(in), optional :: default

Default real value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_integer_i1(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

Integer value

integer(kind=tf_i1), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_integer_i2(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

Integer value

integer(kind=tf_i2), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_integer_i4(table, key, val, default, stat, origin)

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

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

Integer value

integer(kind=tf_i4), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_integer_i8(table, key, val, default, stat, origin)

Retrieve TOML value as eight byte integer

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

Integer value

integer(kind=tf_i8), intent(in), optional :: default

Default integer value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_bool(table, key, val, default, stat, origin)

Retrieve TOML value as logical

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

logical, intent(out) :: val

Boolean value

logical, intent(in), optional :: default

Default boolean value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_datetime(table, key, val, default, stat, origin)

Retrieve TOML value as datetime

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

Datetime value

type(toml_datetime), intent(in), optional :: default

Default datetime value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure

private subroutine get_key_value_string(table, key, val, default, stat, origin)

Retrieve TOML value as deferred-length character

Arguments

Type IntentOptional Attributes Name
class(toml_table), intent(inout) :: table

Instance of the TOML table

type(toml_key), intent(in) :: key

Key in this TOML table

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

String value

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

Default string value

integer, intent(out), optional :: stat

Status of operation

integer, intent(out), optional :: origin

Origin in the data structure