Definition of archiver object
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=:), | public, | allocatable | :: | ar |
Path to archiver |
||
| logical, | public | :: | echo | = | .true. |
Print all command |
|
| logical, | public | :: | use_response_file | = | .false. |
Use response files to pass arguments |
|
| logical, | public | :: | verbose | = | .true. |
Verbose output of command |
Dump dependency to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(srcfile_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Write serializable object to file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
| character(len=*), | intent(in) | :: | file |
File name |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
| logical, | intent(in), | optional | :: | json |
Optional JSON format |
Write serializable object to a formatted Fortran unit
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
| integer, | intent(in) | :: | unit |
Formatted unit |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
| logical, | intent(in), | optional | :: | json |
Optional JSON format requested? |
Dump dependency to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(archiver_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Read dependency from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(srcfile_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Read dependency tree from file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
| character(len=*), | intent(in) | :: | file |
File name |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
| logical, | intent(in), | optional | :: | json |
Optional JSON format |
Read dependency tree from file init JSON interpreter Read object from TOML table
use default TOML parser
Read object from TOML table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self |
Instance of the dependency tree |
||
| integer, | intent(in) | :: | unit |
File name |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
|
| logical, | intent(in), | optional | :: | json |
Optional JSON format |
Read dependency from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(archiver_t), | intent(inout) | :: | self |
Instance of the serializable object |
||
| type(toml_table), | intent(inout) | :: | table |
Data structure |
||
| type(error_t), | intent(out), | allocatable | :: | error |
Error handling |
Create static archive
Create an archive
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(archiver_t), | intent(in) | :: | self |
Instance of the archiver object |
||
| character(len=*), | intent(in) | :: | output |
Name of the archive to generate |
||
| type(string_t), | intent(in) | :: | args(:) |
Object files to include into the archive |
||
| character(len=*), | intent(in) | :: | log_file |
Compiler output log file |
||
| integer, | intent(out) | :: | stat |
Status flag |
||
| logical, | intent(in), | optional | :: | dry_run |
Optional mocking |
Check that two source files are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(srcfile_t), | intent(in) | :: | this | |||
| class(serializable_t), | intent(in) | :: | that |
Serialization interface
Check that two archiver_t objects are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(archiver_t), | intent(in) | :: | this | |||
| class(serializable_t), | intent(in) | :: | that |
Test load/write roundtrip
Test serialization of a serializable object Dump to scratch file Load from scratch file Check same
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(serializable_t), | intent(inout) | :: | self | |||
| character(len=*), | intent(in) | :: | message | |||
| type(error_t), | intent(out), | allocatable | :: | error |
type, extends(serializable_t) :: archiver_t !> Path to archiver character(len=:), allocatable :: ar !> Use response files to pass arguments logical :: use_response_file = .false. !> Print all command logical :: echo = .true. !> Verbose output of command logical :: verbose = .true. contains !> Create static archive procedure :: make_archive !> Serialization interface procedure :: serializable_is_same => ar_is_same procedure :: dump_to_toml procedure :: load_from_toml end type archiver_t