Feature plugin API.
Defines the base watch_feature_t type, which acts as a lightweight
callback interface. Feature implementations can extend this type and
override any subset of callbacks.
init(cfg) once during watcher initon_start() once after initon_watch_list_built(files, roots) after watch list computation (and on rebuild)on_manifest_changed(old_key, new_key) when the manifest requires rebuildon_change_detected(changed) when file changes are detectedon_before_run(cmd) just before running the commandon_after_run(exitstat, seconds) after command completionDefault implementations are no-ops. Dummy references are used where needed to avoid compiler warnings about unused dummy arguments.
Base feature type (override callbacks to implement behavior).
| procedure, public :: init => feat_init_noop | |
| procedure, public :: on_after_run => feat_after_noop | |
| procedure, public :: on_before_run => feat_before_noop | |
| procedure, public :: on_change_detected => feat_change_noop | |
| procedure, public :: on_manifest_changed => feat_manifest_noop | |
| procedure, public :: on_start => feat_noop | |
| procedure, public :: on_watch_list_built => feat_list_noop |
No-op callback invoked after executing the command.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watch_feature_t), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | exitstat | |||
| real, | intent(in) | :: | seconds |
No-op callback invoked just before executing the command.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watch_feature_t), | intent(inout) | :: | self | |||
| character(len=:), | intent(inout), | allocatable | :: | cmd |
No-op callback for detected file changes.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watch_feature_t), | intent(inout) | :: | self | |||
| type(string_t), | intent(in), | allocatable | :: | changed(:) |
No-op init callback.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watch_feature_t), | intent(inout) | :: | self | |||
| type(watch_config_t), | intent(in) | :: | cfg |
No-op callback for watch list rebuild completion.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watch_feature_t), | intent(inout) | :: | self | |||
| type(string_t), | intent(inout), | allocatable | :: | files(:) | ||
| type(root_info_t), | intent(inout), | allocatable | :: | roots(:) |
No-op callback for manifest key change.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watch_feature_t), | intent(inout) | :: | self | |||
| integer(kind=int64), | intent(in) | :: | old_key | |||
| integer(kind=int64), | intent(in) | :: | new_key |
No-op start callback.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(watch_feature_t), | intent(inout) | :: | self |