diff options
Diffstat (limited to 'src/sdp/meta/object_setter.d')
| -rw-r--r-- | src/sdp/meta/object_setter.d | 96 | 
1 files changed, 55 insertions, 41 deletions
diff --git a/src/sdp/meta/object_setter.d b/src/sdp/meta/object_setter.d index 380bab7..2e92877 100644 --- a/src/sdp/meta/object_setter.d +++ b/src/sdp/meta/object_setter.d @@ -6,63 +6,77 @@  module sdp.meta.object_setter;  template ObjectSetter() {    /+ structs +/ -  struct HeadingAttrib { -    string lev                            = "9"; -    int    heading_lev_markup             = 9; -    int    heading_lev_collapsed          = 9; -    int[]  closes_lev_collapsed           = []; -    int[]  closes_lev_markup              = []; -    int    array_ptr                      = 0; -    int    heading_array_ptr_segments     = 0; +  struct DocObj_TypeInfo_ { +    string                 of_part                            = ""; // frontmatter, body, backmatter +    string                 of_section                         = ""; // toc, body, glossary, biography, book index, blurb +    string                 is_of                              = ""; // para, block ? +    string                 is_a                               = ""; // heading, para, table, code block, group, ...    } -  struct ObjGenericComposite { -    // size_t id; -    string                 of_part                            = ""; -    string                 of_section                         = ""; -    string                 is_of                              = ""; -    string                 is_a                               = ""; -    string                 text                               = ""; -    string                 obj_cite_number                    = ""; -    string                 obj_cite_number_off                = ""; -    string                 obj_cite_number_bkidx              = ""; -    int                    obj_cite_number_type               = 0; -    string[]               anchor_tags                        = []; +  struct DocObj_TxtAttrib_ {      int                    indent_base                        = 0;      int                    indent_hang                        = 0;      bool                   bullet                             = false; +    string                 language                           = ""; // not implemented, consider +  } +  struct DocObj_Has_ {      bool                   inline_links                       = false;      bool                   inline_notes_reg                   = false;      bool                   inline_notes_star                  = false;      bool                   contains_image_without_dimensions  = false; -    string                 language                           = ""; // not implemented, consider -    string                 code_block_syntax                  = ""; -    int                    table_number_of_columns            = 0; -    double[]               table_column_widths                = []; -    string[]               table_column_aligns                = []; -    bool                   table_heading                      = false; -    bool                   table_walls                        = false; // not implemented -    int                    ocn                                = 0; -    string                 segment_anchor_tag                 = ""; -    string                 segname_prev                       = ""; -    string                 segname_next                       = ""; -    int                    parent_lev_markup                  = 0; -    int                    parent_ocn                         = 0; -    int[]                  ancestors                          = []; +  } +  struct DocObj_Node_ { +    string[string][string] node; +    int                    ocn                                = 0; // duplicated as string with obj_cite_number +    string                 obj_cite_number                    = ""; // duplicated as int with ocn may apply additional info for backmatter (glossary, biblio etc.)      string                 marked_up_level                    = "9";      int                    heading_lev_markup                 = 9;      int                    heading_lev_collapsed              = 9;      int[]                  dom_markedup                       = [ 0, 0, 0, 0, 0, 0, 0, 0,];      int[]                  dom_collapsed                      = [ 0, 0, 0, 0, 0, 0, 0, 0,];      int[]                  heading_ancestors                  = [ 0, 0, 0, 0, 0, 0, 0, 0,]; +    int                    parent_lev_markup                  = 0; +    int                    parent_ocn                         = 0; +    int[]                  ancestors                          = []; +  } +  struct DocObj_Table_ { +    int                    number_of_columns                  = 0; +    double[]               column_widths                      = []; +    string[]               column_aligns                      = []; +    bool                   heading                            = false; +    bool                   walls                              = false; // not implemented +  } +  struct DocObj_CodeBlock_ { +    string                 syntax                             = ""; +  } +  struct DocObj_Pointer_ { +    int                    doc_object                         = 0; +    int                    html_segnames                      = 0; +    int                    heading                            = 0; +  } +  struct DocObj_Tags_ {      string[]               heading_ancestors_text             = [ "", "", "", "", "", "", "", "", ]; +    string                 segment_anchor_tag                 = ""; +    string                 segname_prev                       = ""; +    string                 segname_next                       = "";      string[]               lev4_subtoc                        = []; -    int                    heading_array_ptr                  = 0; -    int                    ptr_doc_object                     = 0; -    int                    ptr_html_segnames                  = 0; -    int                    ptr_heading                        = 0; -    int                    array_ptr                          = 0; -    int                    heading_array_ptr_segments         = 0; -    string[string][string] node; +    string[]               anchor_tags                        = []; +  } +  struct DocObj_Misc_ { +    string                 obj_cite_number_bkidx              = ""; +    string                 obj_cite_number_off                = ""; +    int                    obj_cite_number_type               = 0; // { ocn, non, bkidx } +  } +  struct ObjGenericComposite { +    string                 text                               = ""; +    DocObj_TypeInfo_       typeinfo; +    DocObj_TxtAttrib_      attrib; +    DocObj_Tags_           tags; +    DocObj_Has_            has; +    DocObj_Table_          table; +    DocObj_CodeBlock_      code_block; +    DocObj_Misc_           misc; +    DocObj_Pointer_        ptr; +    DocObj_Node_           node;    }    struct TheObjects {      ObjGenericComposite[] oca;  | 
