2021-06-04 01:03:51 +03:00
|
|
|
[BehaviourElement::] Behaviour Element.
|
|
|
|
|
2021-06-27 18:10:51 +03:00
|
|
|
To write the Behaviour element (Bh) in the index.
|
2021-06-04 01:03:51 +03:00
|
|
|
|
|
|
|
@ This simply itemises kinds of action, and what defines them.
|
|
|
|
|
|
|
|
=
|
2021-07-26 15:48:49 +03:00
|
|
|
void BehaviourElement::render(OUTPUT_STREAM, index_session *session) {
|
|
|
|
localisation_dictionary *LD = Indexing::get_localisation(session);
|
|
|
|
inter_tree *I = Indexing::get_tree(session);
|
|
|
|
tree_inventory *inv = Indexing::get_inventory(session);
|
2021-06-04 01:03:51 +03:00
|
|
|
|
2022-02-03 01:35:38 +02:00
|
|
|
int num_naps = InterNodeList::array_len(inv->named_action_pattern_nodes);
|
2021-06-04 01:03:51 +03:00
|
|
|
|
|
|
|
if (num_naps == 0) {
|
|
|
|
HTML_OPEN("p");
|
2021-07-26 02:34:51 +03:00
|
|
|
Localisation::roman(OUT, LD, I"Index.Elements.Bh.None");
|
2021-06-04 01:03:51 +03:00
|
|
|
HTML_CLOSE("p");
|
|
|
|
} else {
|
2022-02-03 01:35:38 +02:00
|
|
|
InterNodeList::array_sort(inv->named_action_pattern_nodes, MakeSynopticModuleStage::module_order);
|
2021-07-25 00:04:35 +03:00
|
|
|
inter_package *pack;
|
|
|
|
LOOP_OVER_INVENTORY_PACKAGES(pack, i, inv->named_action_pattern_nodes) {
|
2022-03-01 00:24:58 +02:00
|
|
|
text_stream *name = Metadata::optional_textual(pack, I"^name");
|
2021-06-04 01:03:51 +03:00
|
|
|
HTML_OPEN("p"); WRITE("<b>%S</b>", name);
|
2021-07-24 20:16:56 +03:00
|
|
|
IndexUtilities::link_package(OUT, pack);
|
2021-06-04 01:03:51 +03:00
|
|
|
HTML_TAG("br");
|
2021-07-25 17:11:01 +03:00
|
|
|
WRITE(" ");
|
2021-07-26 02:34:51 +03:00
|
|
|
Localisation::italic(OUT, LD, I"Index.Elements.Bh.Defined");
|
2022-01-31 01:49:12 +02:00
|
|
|
inter_tree_node *D = InterPackage::head(pack);
|
2021-06-04 01:03:51 +03:00
|
|
|
LOOP_THROUGH_INTER_CHILDREN(C, D) {
|
2022-03-14 00:08:41 +02:00
|
|
|
if (Inode::is(C, PACKAGE_IST)) {
|
2022-03-01 02:41:22 +02:00
|
|
|
inter_package *entry = PackageInstruction::at_this_head(C);
|
2022-03-11 01:54:43 +02:00
|
|
|
if (InterPackage::type(entry) ==
|
2022-01-15 01:44:06 +02:00
|
|
|
LargeScale::package_type(I, I"_named_action_pattern_entry")) {
|
2022-03-01 00:24:58 +02:00
|
|
|
text_stream *text = Metadata::optional_textual(entry, I"^text");
|
2021-06-04 01:03:51 +03:00
|
|
|
HTML_TAG("br");
|
|
|
|
WRITE(" %S", text);
|
2021-07-24 20:16:56 +03:00
|
|
|
IndexUtilities::link_package(OUT, entry);
|
2021-06-04 01:03:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HTML_CLOSE("p");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|