| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(compile_command_t), | public, | allocatable | :: | command(:) | 
Operation
Cleanup a compile command table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self | Instance of the serializable object | 
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 compile_command_table_t to toml table
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_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 compile_command_table_t from toml table (no checks made at this stage)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_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 | 
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 | 
Register a new compile command
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| character(len=*), | intent(in) | :: | command | Data structure | ||
| integer, | intent(in) | :: | target_os | The target OS of the compile_commands.json (may be cross-compiling) | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| type(compile_command_t), | intent(in) | :: | command | Data structure | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
Serialization interface
Check that two compile_command_table_t objects are equal All checks passed!
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_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 | 
Write compile_commands.json file. Because Jonquil does not support non-named arrays, create a custom json here.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(compile_command_table_t), | intent(inout) | :: | self | Instance of the serializable object | ||
| character(len=*), | intent(in) | :: | filename | The file name | ||
| type(error_t), | intent(out), | allocatable | :: | error | Error handling | 
type, extends(serializable_t) :: compile_command_table_t type(compile_command_t), allocatable :: command(:) contains !> Operation procedure :: destroy => cct_destroy procedure :: write => cct_write procedure, private :: cct_register procedure, private :: cct_register_object generic :: register => cct_register, & cct_register_object !> Serialization interface procedure :: serializable_is_same => cct_is_same procedure :: dump_to_toml => cct_dump_toml procedure :: load_from_toml => cct_load_toml end type compile_command_table_t