1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-01 06:24:58 +03:00
inform7/inbuild/supervisor-module/Chapter 5/Template Services.w

26 lines
702 B
OpenEdge ABL
Raw Normal View History

[Templates::] Template Services.
2020-03-31 02:17:21 +03:00
Behaviour specific to copies of the template genre.
2020-05-05 01:34:55 +03:00
@h Scanning metadata.
Metadata for website templates -- or rather, the complete lack of same -- is
stored in the following structure.
=
typedef struct inform_template {
struct inbuild_copy *as_copy;
2020-02-19 22:48:30 +02:00
struct semantic_version_number version;
2020-05-09 15:07:39 +03:00
CLASS_DEFINITION
} inform_template;
2020-05-05 01:34:55 +03:00
@ This is called as soon as a new copy |C| of the language genre is created.
=
void Templates::scan(inbuild_copy *C) {
inform_template *T = CREATE(inform_template);
2020-05-05 01:34:55 +03:00
T->as_copy = C;
T->version = VersionNumbers::null();
2020-05-05 01:34:55 +03:00
if (C == NULL) internal_error("no copy to scan");
Copies::set_metadata(C, STORE_POINTER_inform_template(T));
}