diff options
Diffstat (limited to 'src/sisudoc/ocda/meta/metadoc_object_setter.d')
| -rw-r--r-- | src/sisudoc/ocda/meta/metadoc_object_setter.d | 47 |
1 files changed, 41 insertions, 6 deletions
diff --git a/src/sisudoc/ocda/meta/metadoc_object_setter.d b/src/sisudoc/ocda/meta/metadoc_object_setter.d index ba2f268..2eab062 100644 --- a/src/sisudoc/ocda/meta/metadoc_object_setter.d +++ b/src/sisudoc/ocda/meta/metadoc_object_setter.d @@ -56,19 +56,54 @@ module sisudoc.ocda.meta.metadoc_object_setter; @safe: template ObjectSetter() { /+ structs +/ - struct DocObj_TxtAttrib_ { - int indent_base = 0; - int indent_hang = 0; - bool bullet = false; - string language = ""; + /+ ↓ what a document has: the counts, the lists and the indexes that the + output writers ask doc_matters.has for. + . + plain data, so that it can be built by the parser, which has the whole + markup in front of it, or from a loaded abstraction, which has only + what the artefact carries. The member names are the ones the writers + already use, so which of the two built it is not visible downstream. + . + docSectKeysSeq() turns section_keys_sequenced into the per format + accessors (.scroll, .seg, .sql, .latex, .text) the writers walk. + +/ + struct ST_DocHas { + uint inline_links; + uint inline_notes_reg; + uint inline_notes_star; + uint codeblocks; + uint tables; + uint blocks; + uint groups; + uint poems; + uint quotes; + string[] imagelist; + string[][string] section_keys_sequenced; + string[] segnames_lv4; + string[] segnames_lv_0_to_4; + string[string][string] tag_associations; + ulong images() { + return imagelist.length; + } + auto keys_seq() { + import sisudoc.ocda.meta.metadoc_from_src_functions : docSectKeysSeq; + mixin docSectKeysSeq; + return docSectKeysSeq(section_keys_sequenced); + } } - struct DocObj_Has_ { + struct DocObj_Has_ { // review bool inline_links = false; bool inline_notes_reg = false; bool inline_notes_star = false; bool images = false; bool image_without_dimensions = false; } + struct DocObj_TxtAttrib_ { + int indent_base = 0; + int indent_hang = 0; + bool bullet = false; + string language = ""; + } struct DocObj_Table_ { int number_of_columns = 0; double[] column_widths = []; |
