Implementation of the meta data for an example.
The example data structure is effectively a decorated version of an executable and shares most of its properties, except for the defaults and can be handled under most circumstances just like any other executable.
A example table can currently have the following fields
[[ example ]]
name = "string"
source-dir = "path"
main = "file"
link = ["lib"]
[example.dependencies]
Configuation meta data for an example
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(dependency_config_t), | public, | allocatable | :: | dependency(:) |
Dependency meta data for this executable |
||
type(string_t), | public, | allocatable | :: | link(:) |
Libraries to link against |
||
character(len=:), | public, | allocatable | :: | main |
Name of the source file declaring the main program |
||
character(len=:), | public, | allocatable | :: | name |
Name of the resulting executable |
||
character(len=:), | public, | allocatable | :: | source_dir |
Source directory for collecting the executable |
generic, public :: dump => dump_to_toml, dump_to_file, dump_to_unit | |
procedure, public :: dump_to_toml | |
procedure, public :: info | ../../ Print information on this instance |
generic, public :: load => load_from_toml, load_from_file, load_from_unit | |
procedure, public :: load_from_toml | |
generic, public :: operator(==) => serializable_is_same | |
procedure, public :: serializable_is_same => exe_is_same | ../../ Serialization interface |
procedure, public, non_overridable :: test_serialization | ../../ Test load/write roundtrip |
Construct a new example configuration from a TOML data structure
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(example_config_t), | intent(out) | :: | self |
Instance of the example configuration |
||
type(toml_table), | intent(inout) | :: | table |
Instance of the TOML data structure |
||
type(error_t), | intent(out), | allocatable | :: | error |
Error handling |