diff options
Diffstat (limited to 'src/sdp/ao_object_setter.d')
-rw-r--r-- | src/sdp/ao_object_setter.d | 48 |
1 files changed, 32 insertions, 16 deletions
diff --git a/src/sdp/ao_object_setter.d b/src/sdp/ao_object_setter.d index 844af9b..35ca768 100644 --- a/src/sdp/ao_object_setter.d +++ b/src/sdp/ao_object_setter.d @@ -6,9 +6,14 @@ template ObjectSetter() { /+ structs +/ struct HeadingAttrib { - string lev = "9"; - int lev_markup_number = 9; - int lev_collapsed_number = 9; + string lev = "9"; + int lev_int_markup = 9; + int lev_int_collapsed = 9; + int[] closes_lev_collapsed = []; // TODO track + int[] closes_lev_markup = []; // TODO track + int array_ptr = 0; + // heading segments, 1~ lev4: + int heading_array_ptr_segments = 0; // TODO } struct ParaAttrib { int indent_start = 0; @@ -22,10 +27,22 @@ template ObjectSetter() { // no .attrib and no .obj_cite_number } struct Node { - int ocn = 0; - int parent_lev = 0; - int parent_ocn = 0; - string node = ""; + int ocn = 0; + string seg_anchor_tag = ""; + // parent + int parent_lev_int_markup = 0; + int parent_ocn = 0; + int[] ancestors = []; // TODO track + // heading: + int heading_lev_int_markup = 0; + int heading_lev_int_collapsed = 0; + int[] heading_closes_lev_collapsed = []; // TODO track + int[] heading_closes_lev_markup = []; // TODO track + int heading_array_ptr = 0; + // heading segments, 1~ lev4: + int heading_array_ptr_segments = 0; // TODO + // node info json string: + string node = ""; } struct ObjComposite { string use = ""; @@ -59,8 +76,8 @@ template ObjectSetter() { in int obj_cite_number, in string[] tags, in string lev, - in int lev_markup_number, - in int lev_collapsed_number, + in int lev_int_markup, + in int lev_int_collapsed, ) { ObjComposite object_set; object_set.use = "content"; @@ -70,9 +87,8 @@ template ObjectSetter() { object_set.obj_cite_number = (obj_cite_number==0) ? "" : to!string(obj_cite_number); object_set.anchor_tags ~= tags; object_set.heading_attrib.lev = lev; - object_set.heading_attrib.lev_markup_number = lev_markup_number; - object_set.heading_attrib.lev_collapsed_number = lev_collapsed_number; - // object_set.node_structure.node = _node; + object_set.heading_attrib.lev_int_markup = lev_int_markup; + object_set.heading_attrib.lev_int_collapsed = lev_int_collapsed; return object_set; } auto contents_para( @@ -81,7 +97,7 @@ template ObjectSetter() { in string attrib, in int obj_cite_number, in int[string] indent, - in bool bullet + in bool bullet, ) { ObjComposite object_set; object_set.use = "content"; @@ -101,7 +117,7 @@ template ObjectSetter() { in string attrib, in int obj_cite_number, in int[string] indent, - in bool bullet + in bool bullet, ) { ObjComposite object_set; object_set.use = "content"; @@ -137,7 +153,7 @@ template ObjectSetter() { in string type, in string object, in string attrib, - in int obj_cite_number + in int obj_cite_number, ) { ObjComposite object_set; object_set.use = "content"; @@ -152,7 +168,7 @@ template ObjectSetter() { in string type, in string object, in string attrib_language_syntax, - in int obj_cite_number + in int obj_cite_number, ) { ObjComposite object_set; object_set.use = "content"; |