From b1f029933ebe8914448562625cc9f0b845baef44 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 19 Jun 2018 18:36:55 -0400 Subject: naming is_of_ (is_ of_) --- src/sdp/meta/metadoc_from_src.d | 244 ++++++++++++++++++++-------------------- src/sdp/meta/object_setter.d | 12 +- 2 files changed, 130 insertions(+), 126 deletions(-) (limited to 'src/sdp') diff --git a/src/sdp/meta/metadoc_from_src.d b/src/sdp/meta/metadoc_from_src.d index cc9cffa..e9f930c 100644 --- a/src/sdp/meta/metadoc_from_src.d +++ b/src/sdp/meta/metadoc_from_src.d @@ -326,9 +326,9 @@ template SiSUdocAbstraction() { an_object["glossary_nugget"] = ""; an_object["blurb_nugget"] = ""; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "frontmatter"; - comp_obj_heading_.typeinfo.of_section = "toc"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "frontmatter"; + comp_obj_heading_.typeinfo.is_of_section = "toc"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Table of Contents"; comp_obj_heading_.node.ocn = 0; @@ -466,9 +466,9 @@ template SiSUdocAbstraction() { an_object_key="glossary_nugget"; // if (line.matchFirst(rgx.heading_glossary)) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "glossary"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "glossary"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Glossary"; comp_obj_heading_.node.ocn = 0; @@ -484,9 +484,9 @@ template SiSUdocAbstraction() { comp_obj_heading_.node.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0]; the_glossary_section ~= comp_obj_heading_; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "glossary"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "glossary"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Glossary"; comp_obj_heading_.node.ocn = 0; @@ -505,9 +505,9 @@ template SiSUdocAbstraction() { } else { _para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur); comp_obj_para = comp_obj_para.init; - comp_obj_para.typeinfo.of_part = "backmatter"; - comp_obj_para.typeinfo.of_section = "glossary"; - comp_obj_para.typeinfo.is_of = "para"; + comp_obj_para.typeinfo.is_of_part = "backmatter"; + comp_obj_para.typeinfo.is_of_section = "glossary"; + comp_obj_para.typeinfo.is_of_type = "para"; comp_obj_para.typeinfo.is_a = "glossary"; comp_obj_para.text = line.to!string.strip; comp_obj_para.node.ocn = 0; @@ -574,9 +574,9 @@ template SiSUdocAbstraction() { an_object_key="blurb_nugget"; if (line.matchFirst(rgx.heading_blurb)) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "blurb"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "blurb"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Blurb"; comp_obj_heading_.node.ocn = 0; @@ -592,9 +592,9 @@ template SiSUdocAbstraction() { comp_obj_heading_.node.dom_collapsed = [ 1, 1, 0, 0, 0, 0, 0, 0]; the_blurb_section ~= comp_obj_heading_; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "blurb"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "blurb"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Blurb"; comp_obj_heading_.node.ocn = 0; @@ -613,9 +613,9 @@ template SiSUdocAbstraction() { } else if (line.matchFirst(rgx.heading) && (opt_action.backmatter && opt_action.section_blurb)) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "blurb"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "blurb"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = line.to!string; comp_obj_heading_.node.ocn = 0; @@ -631,9 +631,9 @@ template SiSUdocAbstraction() { } else { _para_match_(line, an_object, an_object_key, indent, bullet, obj_type_status, line_occur); comp_obj_para = comp_obj_para.init; - comp_obj_para.typeinfo.of_part = "backmatter"; - comp_obj_para.typeinfo.of_section = "blurb"; - comp_obj_para.typeinfo.is_of = "para"; + comp_obj_para.typeinfo.is_of_part = "backmatter"; + comp_obj_para.typeinfo.is_of_section = "blurb"; + comp_obj_para.typeinfo.is_of_type = "para"; comp_obj_para.typeinfo.is_a = "blurb"; comp_obj_para.text = munge.url_links(line.to!string.strip).replaceFirst(rgx.para_attribs, ""); comp_obj_para.node.ocn = 0; @@ -740,14 +740,14 @@ template SiSUdocAbstraction() { debug(comment) { writeln(line); } - an_object[an_object_key] ~= line ~= "\n"; - comp_obj_comment = comp_obj_comment.init; - comp_obj_comment.typeinfo.of_part = "comment"; // breaks flow - comp_obj_comment.typeinfo.of_section = "comment"; // breaks flow - comp_obj_comment.typeinfo.is_of = "comment"; - comp_obj_comment.typeinfo.is_a = "comment"; - comp_obj_comment.text = an_object[an_object_key].strip; - the_document_body_section ~= comp_obj_comment; + an_object[an_object_key] ~= line ~= "\n"; + comp_obj_comment = comp_obj_comment.init; + comp_obj_comment.typeinfo.is_of_part = "comment"; // breaks flow + comp_obj_comment.typeinfo.is_of_section = "comment"; // breaks flow + comp_obj_comment.typeinfo.is_of_type = "comment"; + comp_obj_comment.typeinfo.is_a = "comment"; + comp_obj_comment.text = an_object[an_object_key].strip; + the_document_body_section ~= comp_obj_comment; _common_reset_(line_occur, an_object, obj_type_status); processing.remove("verse"); ++cntr; @@ -946,9 +946,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_para = comp_obj_para.init; - comp_obj_para.typeinfo.of_part = "body"; - comp_obj_para.typeinfo.of_section = "body"; - comp_obj_para.typeinfo.is_of = "para"; + comp_obj_para.typeinfo.is_of_part = "body"; + comp_obj_para.typeinfo.is_of_section = "body"; + comp_obj_para.typeinfo.is_of_type = "para"; comp_obj_para.typeinfo.is_a = "para"; comp_obj_para.text = an_object["substantive"].to!string.strip; comp_obj_para.node.ocn = obj_cite_digits.digit; @@ -1044,9 +1044,9 @@ template SiSUdocAbstraction() { } if (an_object["glossary_nugget"].length == 0) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "empty"; - comp_obj_heading_.typeinfo.of_section = "empty"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "empty"; + comp_obj_heading_.typeinfo.is_of_section = "empty"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there is no Glossary section"; comp_obj_heading_.node.ocn = 0; @@ -1072,9 +1072,9 @@ template SiSUdocAbstraction() { = biblio._bibliography_(biblio_unsorted_incomplete, bib_arr_json); if (biblio_ordered.length > 0) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "bibliography"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "bibliography"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Bibliography"; comp_obj_heading_.node.ocn = 0; @@ -1088,9 +1088,9 @@ template SiSUdocAbstraction() { comp_obj_heading_.node.parent_lev_markup = 0; the_bibliography_section ~= comp_obj_heading_; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "bibliography"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "bibliography"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Bibliography"; comp_obj_heading_.node.ocn = 0; @@ -1106,9 +1106,9 @@ template SiSUdocAbstraction() { the_bibliography_section ~= comp_obj_heading_; } else { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "empty"; - comp_obj_heading_.typeinfo.of_section = "empty"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "empty"; + comp_obj_heading_.typeinfo.is_of_section = "empty"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there is no Bibliography"; comp_obj_heading_.node.ocn = 0; @@ -1138,9 +1138,9 @@ template SiSUdocAbstraction() { ((entry["url"].str.empty) ? "" : ", [" ~ entry["url"].str ~ "]"), ); comp_obj_para = comp_obj_para.init; - comp_obj_para.typeinfo.of_part = "backmatter"; - comp_obj_para.typeinfo.of_section = "bibliography"; - comp_obj_para.typeinfo.is_of = "para"; + comp_obj_para.typeinfo.is_of_part = "backmatter"; + comp_obj_para.typeinfo.is_of_section = "bibliography"; + comp_obj_para.typeinfo.is_of_type = "para"; comp_obj_para.typeinfo.is_a = "bibliography"; comp_obj_para.text = out_.to!string.strip; comp_obj_para.node.ocn = 0; @@ -1175,9 +1175,9 @@ template SiSUdocAbstraction() { } if (an_object["blurb_nugget"].length == 0) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "empty"; - comp_obj_heading_.typeinfo.of_section = "empty"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "empty"; + comp_obj_heading_.typeinfo.is_of_section = "empty"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there is no Blurb section"; comp_obj_heading_.node.ocn = 0; @@ -1201,9 +1201,9 @@ template SiSUdocAbstraction() { "base_position" : 1, ]; comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.typeinfo.of_part = "frontmatter"; - comp_obj_toc.typeinfo.of_section = "toc"; - comp_obj_toc.typeinfo.is_of = "para"; + comp_obj_toc.typeinfo.is_of_part = "frontmatter"; + comp_obj_toc.typeinfo.is_of_section = "toc"; + comp_obj_toc.typeinfo.is_of_type = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; comp_obj_toc.misc.object_number_off = ""; @@ -1812,9 +1812,9 @@ template SiSUdocAbstraction() { - obj.node.dom_collapsed = dom_collapsed; +/ comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "empty"; - comp_obj_heading_.typeinfo.of_section = "empty"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "empty"; + comp_obj_heading_.typeinfo.is_of_section = "empty"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.node.ocn = 0; comp_obj_para.misc.object_number_off = ""; @@ -2388,9 +2388,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_of_part = "body"; + comp_obj_block.typeinfo.is_of_section = "body"; + comp_obj_block.typeinfo.is_of_type = "block"; comp_obj_block.typeinfo.is_a = "verse"; comp_obj_block.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -2445,9 +2445,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_of_part = "body"; + comp_obj_block.typeinfo.is_of_section = "body"; + comp_obj_block.typeinfo.is_of_type = "block"; comp_obj_block.typeinfo.is_a = "verse"; comp_obj_block.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -2487,9 +2487,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_of_part = "body"; + comp_obj_block.typeinfo.is_of_section = "body"; + comp_obj_block.typeinfo.is_of_type = "block"; comp_obj_block.typeinfo.is_a = "verse"; comp_obj_block.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -2544,9 +2544,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_of_part = "body"; + comp_obj_block.typeinfo.is_of_section = "body"; + comp_obj_block.typeinfo.is_of_type = "block"; comp_obj_block.typeinfo.is_a = "verse"; comp_obj_block.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -2902,9 +2902,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_of_part = "body"; + comp_obj_block.typeinfo.is_of_section = "body"; + comp_obj_block.typeinfo.is_of_type = "block"; comp_obj_block.typeinfo.is_a = "quote"; comp_obj_block.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -2945,9 +2945,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_of_part = "body"; + comp_obj_block.typeinfo.is_of_section = "body"; + comp_obj_block.typeinfo.is_of_type = "block"; comp_obj_block.typeinfo.is_a = "group"; comp_obj_block.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -2987,9 +2987,9 @@ template SiSUdocAbstraction() { = obj_im.obj_inline_markup_and_anchor_tags_and_misc(an_object, an_object_key, conf_make_meta); an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; comp_obj_block = comp_obj_block.init; - comp_obj_block.typeinfo.of_part = "body"; - comp_obj_block.typeinfo.of_section = "body"; - comp_obj_block.typeinfo.is_of = "block"; + comp_obj_block.typeinfo.is_of_part = "body"; + comp_obj_block.typeinfo.is_of_section = "body"; + comp_obj_block.typeinfo.is_of_type = "block"; comp_obj_block.typeinfo.is_a = "block"; comp_obj_block.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -3025,9 +3025,9 @@ template SiSUdocAbstraction() { an_object["is"] ); comp_obj_poem_ocn = comp_obj_poem_ocn.init; - comp_obj_poem_ocn.typeinfo.of_part = "body"; - comp_obj_poem_ocn.typeinfo.of_section = "body"; - comp_obj_poem_ocn.typeinfo.is_of = "block"; + comp_obj_poem_ocn.typeinfo.is_of_part = "body"; + comp_obj_poem_ocn.typeinfo.is_of_section = "body"; + comp_obj_poem_ocn.typeinfo.is_of_type = "block"; comp_obj_poem_ocn.typeinfo.is_a = "poem"; comp_obj_poem_ocn.node.ocn = obj_cite_digits.on; comp_obj_poem_ocn.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; // @@ -3064,9 +3064,9 @@ template SiSUdocAbstraction() { an_object["substantive"] = substantive_obj_misc_tuple[sObj.content]; anchor_tags = substantive_obj_misc_tuple[sObj.anchor_tags]; comp_obj_code = comp_obj_code.init; - comp_obj_code.typeinfo.of_part = "body"; - comp_obj_code.typeinfo.of_section = "body"; - comp_obj_code.typeinfo.is_of = "block"; + comp_obj_code.typeinfo.is_of_part = "body"; + comp_obj_code.typeinfo.is_of_section = "body"; + comp_obj_code.typeinfo.is_of_type = "block"; comp_obj_code.typeinfo.is_a = "code"; comp_obj_code.node.ocn = obj_cite_digits.on; comp_obj_block.misc.object_number_off = (obj_cite_digits.off==0) ? "" : obj_cite_digits.off.to!string; @@ -3563,9 +3563,9 @@ template SiSUdocAbstraction() { return ref H table_head, ) { static auto rgx = Rgx(); - table_object.typeinfo.of_part = "body"; - table_object.typeinfo.of_section = "body"; - table_object.typeinfo.is_of = "block"; + table_object.typeinfo.is_of_part = "body"; + table_object.typeinfo.is_of_section = "body"; + table_object.typeinfo.is_of_type = "block"; table_object.typeinfo.is_a = "table"; table_object.has.inline_notes_reg = false; table_object.has.inline_notes_star = false; @@ -4303,9 +4303,9 @@ template SiSUdocAbstraction() { ); toc_txt_= munge.url_links(toc_txt_); comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.typeinfo.of_part = "frontmatter"; - comp_obj_toc.typeinfo.of_section = "toc"; - comp_obj_toc.typeinfo.is_of = "para"; + comp_obj_toc.typeinfo.is_of_part = "frontmatter"; + comp_obj_toc.typeinfo.is_of_section = "toc"; + comp_obj_toc.typeinfo.is_of_type = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; comp_obj_toc.misc.object_number_off = ""; @@ -4322,9 +4322,9 @@ template SiSUdocAbstraction() { "base_position" : 0, ]; comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.typeinfo.of_part = "frontmatter"; - comp_obj_toc.typeinfo.of_section = "toc"; - comp_obj_toc.typeinfo.is_of = "para"; + comp_obj_toc.typeinfo.is_of_part = "frontmatter"; + comp_obj_toc.typeinfo.is_of_section = "toc"; + comp_obj_toc.typeinfo.is_of_type = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; comp_obj_toc.misc.object_number_off = ""; @@ -4337,9 +4337,9 @@ template SiSUdocAbstraction() { the_table_of_contents_section["scroll"] ~= comp_obj_toc; } comp_obj_toc = comp_obj_toc.init; - comp_obj_toc.typeinfo.of_part = "frontmatter"; - comp_obj_toc.typeinfo.of_section = "toc"; - comp_obj_toc.typeinfo.is_of = "para"; + comp_obj_toc.typeinfo.is_of_part = "frontmatter"; + comp_obj_toc.typeinfo.is_of_section = "toc"; + comp_obj_toc.typeinfo.is_of_type = "para"; comp_obj_toc.typeinfo.is_a = "toc"; comp_obj_toc.node.ocn = 0; comp_obj_toc.misc.object_number_off = ""; @@ -5039,9 +5039,9 @@ template SiSUdocAbstraction() { string bi_tmp_seg, bi_tmp_scroll; string[] bi_tmp_tags; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "bookindex"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "bookindex"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Book Index"; comp_obj_heading_.node.ocn = 0; @@ -5058,9 +5058,9 @@ template SiSUdocAbstraction() { bookindex_section["seg"] ~= comp_obj_heading_; ++mkn; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "bookindex"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "bookindex"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Index"; comp_obj_heading_.node.ocn = 0; @@ -5135,9 +5135,9 @@ template SiSUdocAbstraction() { bi_tmp_scroll = (bi_tmp_scroll).replaceFirst(rgx.trailing_linebreak, ""); bi_tmp_seg = (bi_tmp_seg).replaceFirst(rgx.trailing_linebreak, ""); comp_obj_para = comp_obj_para.init; - comp_obj_para.typeinfo.of_part = "backmatter"; - comp_obj_para.typeinfo.of_section = "bookindex"; - comp_obj_para.typeinfo.is_of = "para"; + comp_obj_para.typeinfo.is_of_part = "backmatter"; + comp_obj_para.typeinfo.is_of_section = "bookindex"; + comp_obj_para.typeinfo.is_of_type = "para"; comp_obj_para.typeinfo.is_a = "bookindex"; comp_obj_para.text = bi_tmp_scroll.to!string.strip; comp_obj_para.node.ocn = 0; @@ -5265,9 +5265,9 @@ template SiSUdocAbstraction() { if ((endnotes_["notes"].length > 0) && (opt_action.backmatter && opt_action.section_endnotes)) { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "endnotes"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "endnotes"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Endnotes"; comp_obj_heading_.node.ocn = 0; @@ -5282,9 +5282,9 @@ template SiSUdocAbstraction() { the_endnotes_section ~= comp_obj_heading_; ++mkn; comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "backmatter"; - comp_obj_heading_.typeinfo.of_section = "endnotes"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "backmatter"; + comp_obj_heading_.typeinfo.is_of_section = "endnotes"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "Endnotes"; comp_obj_heading_.node.ocn = 0; @@ -5301,9 +5301,9 @@ template SiSUdocAbstraction() { ++mkn; } else { comp_obj_heading_ = comp_obj_heading_.init; - comp_obj_heading_.typeinfo.of_part = "empty"; - comp_obj_heading_.typeinfo.of_section = "empty"; - comp_obj_heading_.typeinfo.is_of = "para"; + comp_obj_heading_.typeinfo.is_of_part = "empty"; + comp_obj_heading_.typeinfo.is_of_section = "empty"; + comp_obj_heading_.typeinfo.is_of_type = "para"; comp_obj_heading_.typeinfo.is_a = "heading"; comp_obj_heading_.text = "(skip) there are no Endnotes"; comp_obj_heading_.node.ocn = 0; @@ -5319,9 +5319,9 @@ template SiSUdocAbstraction() { if (opt_action.backmatter && opt_action.section_endnotes) { ObjGenericComposite comp_obj_endnote_; comp_obj_endnote_ = comp_obj_endnote_.init; - comp_obj_endnote_.typeinfo.of_part = "backmatter"; - comp_obj_endnote_.typeinfo.of_section = "endnote"; - comp_obj_endnote_.typeinfo.is_of = "para"; + comp_obj_endnote_.typeinfo.is_of_part = "backmatter"; + comp_obj_endnote_.typeinfo.is_of_section = "endnote"; + comp_obj_endnote_.typeinfo.is_of_type = "para"; comp_obj_endnote_.typeinfo.is_a = "endnote"; comp_obj_endnote_.node.ocn = 0; comp_obj_heading_.misc.object_number_off = ""; @@ -5638,9 +5638,9 @@ template SiSUdocAbstraction() { } ObjGenericComposite _comp_obj_heading_; _comp_obj_heading_ = _comp_obj_heading_.init; - _comp_obj_heading_.typeinfo.of_part = "body"; - _comp_obj_heading_.typeinfo.of_section = "body"; - _comp_obj_heading_.typeinfo.is_of = "para"; + _comp_obj_heading_.typeinfo.is_of_part = "body"; + _comp_obj_heading_.typeinfo.is_of_section = "body"; + _comp_obj_heading_.typeinfo.is_of_type = "para"; _comp_obj_heading_.typeinfo.is_a = "heading"; _comp_obj_heading_.text = _text.to!string.strip; _comp_obj_heading_.node.ocn = obj_cite_digits.on; diff --git a/src/sdp/meta/object_setter.d b/src/sdp/meta/object_setter.d index 967f9ec..77e44e0 100644 --- a/src/sdp/meta/object_setter.d +++ b/src/sdp/meta/object_setter.d @@ -7,10 +7,13 @@ module sdp.meta.object_setter; template ObjectSetter() { /+ structs +/ struct DocObj_TypeInfo_ { // typeinfo - string of_part = ""; // frontmatter, body, backmatter - string of_section = ""; // toc, body, glossary, biography, book index, blurb - string is_of = ""; // para, block ? + string is_of_part = ""; // frontmatter, body, backmatter + string is_of_section = ""; // toc, body, glossary, biography, book index, blurb + string is_of_type = ""; // para, block ? string is_a = ""; // heading, para, table, code block, group, ... + alias of_part = is_of_part; + alias of_section = is_of_section; + alias is_of = is_of_type; } struct DocObj_TxtAttrib_ { // attrib int indent_base = 0; @@ -25,6 +28,7 @@ template ObjectSetter() { bool contains_image_without_dimensions = false; } struct DocObj_Node_ { // node + enum ONtype { none, substantive, non_substantive, glossary, bibliography, book_index, blurb, comment } string[string][string] node; int ocn = 0; string object_number() const @property { @@ -32,7 +36,7 @@ template ObjectSetter() { ? "" : ocn.to!string; } - string ocn_type = ""; // code duplicated typeinfo is_a + int o_n_type = 0; string marked_up_level = "9"; int heading_lev_markup = 9; int heading_lev_collapsed = 9; -- cgit v1.2.3