1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-05 08:34:22 +03:00
inform7/inbuild/supervisor-module/Chapter 1/Supervisor Module.w

125 lines
3.6 KiB
OpenEdge ABL
Raw Normal View History

2020-04-14 19:56:54 +03:00
[SupervisorModule::] Supervisor Module.
2020-01-28 01:20:49 +02:00
Setting up the use of this module.
2020-03-28 15:00:08 +02:00
@ This section simoly sets up the module in ways expected by |foundation|, and
contains no code of interest. The following constant exists only in tools
which use this module:
2020-01-28 01:20:49 +02:00
2020-04-14 19:56:54 +03:00
@d SUPERVISOR_MODULE TRUE
2020-01-28 01:20:49 +02:00
@ To begin with, this module needs to allocate memory:
@e build_methodology_MT
@e build_script_MT
2020-03-28 15:00:08 +02:00
@e build_skill_MT
@e build_step_MT
2020-03-28 15:00:08 +02:00
@e build_vertex_MT
@e control_structure_phrase_MT
@e copy_error_MT
@e element_activation_MT
@e extension_census_datum_MT
@e extension_census_MT
2020-03-28 15:00:08 +02:00
@e extension_dictionary_entry_MT
@e heading_MT
2020-05-07 01:57:17 +03:00
@e heading_tree_MT
2020-03-28 15:00:08 +02:00
@e inbuild_copy_MT
@e inbuild_edition_MT
@e inbuild_genre_MT
@e inbuild_nest_MT
@e inbuild_requirement_MT
@e inbuild_search_result_MT
@e inbuild_work_MT
@e inform_extension_MT
@e inform_kit_ittt_MT
@e inform_kit_MT
@e inform_language_MT
2020-02-10 02:10:58 +02:00
@e inform_pipeline_MT
2020-03-28 15:00:08 +02:00
@e inform_project_MT
@e inform_template_MT
2020-03-09 14:44:59 +02:00
@e kit_dependency_MT
2020-03-28 15:00:08 +02:00
@e known_extension_clash_MT
@e inbuild_work_database_entry_array_MT
2020-01-28 01:20:49 +02:00
=
ALLOCATE_INDIVIDUALLY(build_methodology)
ALLOCATE_INDIVIDUALLY(build_script)
2020-03-28 15:00:08 +02:00
ALLOCATE_INDIVIDUALLY(build_skill)
ALLOCATE_INDIVIDUALLY(build_step)
2020-03-28 15:00:08 +02:00
ALLOCATE_INDIVIDUALLY(build_vertex)
ALLOCATE_INDIVIDUALLY(control_structure_phrase)
ALLOCATE_INDIVIDUALLY(copy_error)
ALLOCATE_INDIVIDUALLY(element_activation)
ALLOCATE_INDIVIDUALLY(extension_census_datum)
ALLOCATE_INDIVIDUALLY(extension_census)
2020-03-28 15:00:08 +02:00
ALLOCATE_INDIVIDUALLY(extension_dictionary_entry)
ALLOCATE_INDIVIDUALLY(heading)
2020-05-07 01:57:17 +03:00
ALLOCATE_INDIVIDUALLY(heading_tree)
2020-03-28 15:00:08 +02:00
ALLOCATE_INDIVIDUALLY(inbuild_copy)
ALLOCATE_INDIVIDUALLY(inbuild_edition)
ALLOCATE_INDIVIDUALLY(inbuild_genre)
ALLOCATE_INDIVIDUALLY(inbuild_nest)
ALLOCATE_INDIVIDUALLY(inbuild_requirement)
ALLOCATE_INDIVIDUALLY(inbuild_search_result)
ALLOCATE_INDIVIDUALLY(inbuild_work)
ALLOCATE_INDIVIDUALLY(inform_extension)
ALLOCATE_INDIVIDUALLY(inform_kit_ittt)
ALLOCATE_INDIVIDUALLY(inform_kit)
ALLOCATE_INDIVIDUALLY(inform_language)
2020-02-10 02:10:58 +02:00
ALLOCATE_INDIVIDUALLY(inform_pipeline)
2020-03-28 15:00:08 +02:00
ALLOCATE_INDIVIDUALLY(inform_project)
ALLOCATE_INDIVIDUALLY(inform_template)
2020-03-09 14:44:59 +02:00
ALLOCATE_INDIVIDUALLY(kit_dependency)
2020-03-28 15:00:08 +02:00
ALLOCATE_INDIVIDUALLY(known_extension_clash)
2020-01-28 01:20:49 +02:00
ALLOCATE_IN_ARRAYS(inbuild_work_database_entry, 100)
2020-03-28 15:00:08 +02:00
@ Like all modules, this one must define a |start| and |end| function:
2020-01-28 01:20:49 +02:00
=
2020-04-14 19:56:54 +03:00
void SupervisorModule::start(void) {
2020-01-28 01:20:49 +02:00
@<Register this module's memory allocation reasons@>;
@<Register this module's stream writers@>;
@<Register this module's debugging log aspects@>;
@<Register this module's debugging log writers@>;
2020-05-03 18:34:53 +03:00
Supervisor::start();
2020-03-28 15:00:08 +02:00
}
2020-04-14 19:56:54 +03:00
void SupervisorModule::end(void) {
2020-01-28 01:20:49 +02:00
}
@
@e EXTENSION_DICTIONARY_MREASON
2020-01-28 01:20:49 +02:00
@<Register this module's memory allocation reasons@> =
Memory::reason_name(EXTENSION_DICTIONARY_MREASON, "extension dictionary");
2020-01-28 01:20:49 +02:00
@<Register this module's stream writers@> =
Writers::register_writer('X', &Works::writer);
2020-03-06 11:38:02 +02:00
Writers::register_writer('J', &Languages::log);
2020-01-28 01:20:49 +02:00
@
@e EXTENSIONS_CENSUS_DA
2020-03-08 01:20:30 +02:00
@e HEADINGS_DA
2020-01-28 01:20:49 +02:00
@<Register this module's debugging log aspects@> =
Log::declare_aspect(EXTENSIONS_CENSUS_DA, L"extensions census", FALSE, FALSE);
2020-03-08 01:20:30 +02:00
Log::declare_aspect(HEADINGS_DA, L"headings", FALSE, FALSE);
2020-01-28 01:20:49 +02:00
@<Register this module's debugging log writers@> =
2020-03-06 11:38:02 +02:00
;
@ This module uses |syntax|, and adds the following annotations to the
syntax tree.
@e embodying_heading_ANNOT /* |heading|: for parse nodes of headings */
@e inclusion_of_extension_ANNOT /* |inform_extension|: for parse nodes of headings */
=
DECLARE_ANNOTATION_FUNCTIONS(embodying_heading, heading)
MAKE_ANNOTATION_FUNCTIONS(embodying_heading, heading)
DECLARE_ANNOTATION_FUNCTIONS(inclusion_of_extension, inform_extension)
MAKE_ANNOTATION_FUNCTIONS(inclusion_of_extension, inform_extension)