TOML array
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 |
Create standard constructor
Default constructor for TOML array type
Instance of the TOML array
Accept a visitor to transverse the data structure
Accept a visitor to transverse the data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_value), | intent(inout) | :: | self |
Instance of the TOML value |
||
class(toml_visitor), | intent(inout) | :: | visitor |
Visitor for this value |
Release allocation hold by TOML array
Deconstructor to cleanup allocations (optional)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array), | intent(inout) | :: | self |
Instance of the TOML array |
Get the TOML value at a given index
Get the TOML value at the respective index
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array), | intent(inout) | :: | self |
Instance of the TOML array |
||
integer, | intent(in) | :: | idx |
Index to the TOML value |
||
class(toml_value), | intent(out), | pointer | :: | ptr |
Pointer to the TOML value |
Get escaped key to TOML value
Get escaped key to TOML value
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_value), | intent(in) | :: | self |
TOML value instance. |
||
character(kind=tfc, len=:), | allocatable | :: | key |
Contains valid TOML key on exit |
Compare raw key of TOML value to input key
Compare raw key of TOML value to input key
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_value), | intent(in) | :: | self |
TOML value instance. |
||
character(kind=tfc, len=*), | intent(in) | :: | key |
TOML raw key to compare to |
Remove the last element from the array
Remove the last element from the data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array), | intent(inout) | :: | self |
Instance of the TOML array |
||
class(toml_value), | intent(out), | allocatable | :: | val |
TOML value to be retrieved |
Append value to array
Push back a TOML value to the array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array), | intent(inout) | :: | self |
Instance of the TOML array |
||
class(toml_value), | intent(inout), | allocatable | :: | val |
TOML value to append to array |
|
integer, | intent(out) | :: | stat |
Status of operation |
Remove the first element from the array
Remove the first element from the data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(toml_array), | intent(inout) | :: | self |
Instance of the TOML array |
||
class(toml_value), | intent(out), | allocatable | :: | val |
TOML value to be retrieved |
type, extends(toml_value) :: toml_array !> Is an inline array rather than an array of tables logical :: inline = .true. !> Storage unit for TOML values of this array class(toml_list_structure), allocatable, private :: list contains !> Get the TOML value at a given index procedure :: get !> Append value to array procedure :: push_back !> Remove the first element from the array procedure :: shift !> Remove the last element from the array procedure :: pop !> Release allocation hold by TOML array procedure :: destroy end type toml_array