2019-08-28 12:35:44 +03:00
|
|
|
[BuildingModule::] Building Module.
|
|
|
|
|
|
|
|
Setting up the use of this module.
|
|
|
|
|
|
|
|
@h Introduction.
|
|
|
|
|
|
|
|
@d BUILDING_MODULE TRUE
|
|
|
|
|
|
|
|
@h Setting up the memory manager.
|
|
|
|
We need to itemise the structures we'll want to allocate:
|
|
|
|
|
2020-05-09 16:15:42 +03:00
|
|
|
@e inter_name_CLASS
|
|
|
|
@e inter_name_generator_CLASS
|
2020-05-09 15:07:39 +03:00
|
|
|
@e package_request_CLASS
|
|
|
|
@e hierarchy_location_CLASS
|
|
|
|
@e hierarchy_attachment_point_CLASS
|
2022-01-14 01:49:42 +02:00
|
|
|
@e module_request_CLASS
|
2020-05-09 15:07:39 +03:00
|
|
|
@e submodule_identity_CLASS
|
|
|
|
@e submodule_request_CLASS
|
|
|
|
@e inter_schema_CLASS
|
|
|
|
@e inter_schema_node_CLASS
|
|
|
|
@e inter_schema_token_CLASS
|
2022-01-23 02:32:26 +02:00
|
|
|
@e schema_parsing_error_CLASS
|
2019-08-28 12:35:44 +03:00
|
|
|
|
|
|
|
=
|
2020-05-09 15:07:39 +03:00
|
|
|
DECLARE_CLASS(hierarchy_location)
|
|
|
|
DECLARE_CLASS(hierarchy_attachment_point)
|
|
|
|
DECLARE_CLASS(package_request)
|
2022-01-14 01:49:42 +02:00
|
|
|
DECLARE_CLASS(module_request)
|
2020-05-09 15:07:39 +03:00
|
|
|
DECLARE_CLASS(submodule_identity)
|
|
|
|
DECLARE_CLASS(submodule_request)
|
|
|
|
DECLARE_CLASS(inter_schema)
|
|
|
|
DECLARE_CLASS(inter_schema_node)
|
|
|
|
DECLARE_CLASS(inter_schema_token)
|
2022-01-23 02:32:26 +02:00
|
|
|
DECLARE_CLASS(schema_parsing_error)
|
2020-05-09 15:07:39 +03:00
|
|
|
|
|
|
|
DECLARE_CLASS_ALLOCATED_IN_ARRAYS(inter_name, 1000)
|
|
|
|
DECLARE_CLASS_ALLOCATED_IN_ARRAYS(inter_name_generator, 1000)
|
2019-08-28 12:35:44 +03:00
|
|
|
|
|
|
|
#ifdef CORE_MODULE
|
|
|
|
MAKE_ANNOTATION_FUNCTIONS(explicit_iname, inter_name)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
@h The beginning.
|
2022-01-10 01:00:15 +02:00
|
|
|
|
|
|
|
@e SCHEMA_COMPILATION_DA
|
|
|
|
@e SCHEMA_COMPILATION_DETAILS_DA
|
|
|
|
@e PACKAGING_DA
|
2019-08-28 12:35:44 +03:00
|
|
|
|
|
|
|
=
|
|
|
|
void BuildingModule::start(void) {
|
|
|
|
@<Register this module's stream writers@>;
|
|
|
|
@<Register this module's debugging log aspects@>;
|
|
|
|
@<Register this module's debugging log writers@>;
|
|
|
|
}
|
|
|
|
|
|
|
|
@<Register this module's stream writers@> =
|
|
|
|
Writers::register_writer('n', &InterNames::writer);
|
|
|
|
|
|
|
|
@<Register this module's debugging log aspects@> =
|
2022-01-10 01:00:15 +02:00
|
|
|
Log::declare_aspect(SCHEMA_COMPILATION_DA,
|
|
|
|
L"schema compilation", FALSE, FALSE);
|
|
|
|
Log::declare_aspect(SCHEMA_COMPILATION_DETAILS_DA,
|
|
|
|
L"schema compilation details", FALSE, FALSE);
|
|
|
|
Log::declare_aspect(PACKAGING_DA,
|
|
|
|
L"packaging", FALSE, FALSE);
|
2019-08-28 12:35:44 +03:00
|
|
|
|
|
|
|
@<Register this module's debugging log writers@> =
|
|
|
|
Writers::register_logger('1', InterSchemas::log);
|
2019-08-31 15:56:36 +03:00
|
|
|
Writers::register_logger('X', Packaging::log);
|
2019-08-28 12:35:44 +03:00
|
|
|
|
2022-01-14 01:49:42 +02:00
|
|
|
@h Initialising.
|
|
|
|
The following is a component part of the |inter_tree| structure, and is comprised
|
|
|
|
of four subcomponents of its own. That makes a lot of working data, but none of
|
|
|
|
it changes the meaning of an Inter tree: it exists as workspace needed by the
|
|
|
|
functions in this module for constructing trees.
|
|
|
|
|
|
|
|
=
|
|
|
|
typedef struct building_site {
|
|
|
|
struct site_structure_data strdata;
|
2022-01-16 14:04:10 +02:00
|
|
|
struct site_hierarchy_data shdata;
|
2022-01-14 01:49:42 +02:00
|
|
|
struct site_packaging_data spdata;
|
|
|
|
struct site_production_data sprdata;
|
|
|
|
struct site_primitives_data spridata;
|
|
|
|
} building_site;
|
|
|
|
|
|
|
|
void BuildingModule::clear_data(inter_tree *I) {
|
2022-01-16 14:04:10 +02:00
|
|
|
LargeScale::clear_site_data(I);
|
|
|
|
HierarchyLocations::clear_site_data(I);
|
|
|
|
Produce::clear_site_data(I);
|
|
|
|
Packaging::clear_site_data(I);
|
|
|
|
Primitives::clear_site_data(I);
|
2022-01-14 01:49:42 +02:00
|
|
|
}
|
|
|
|
|
2019-08-28 12:35:44 +03:00
|
|
|
@h The end.
|
|
|
|
|
|
|
|
=
|
|
|
|
void BuildingModule::end(void) {
|
|
|
|
}
|