aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sdp/ao_object_setter.d
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sdp/ao_object_setter.d')
-rw-r--r--lib/sdp/ao_object_setter.d172
1 files changed, 45 insertions, 127 deletions
diff --git a/lib/sdp/ao_object_setter.d b/lib/sdp/ao_object_setter.d
index ce4611d..a44aeb0 100644
--- a/lib/sdp/ao_object_setter.d
+++ b/lib/sdp/ao_object_setter.d
@@ -2,174 +2,92 @@
object setter
ao_object_setter.d
+/
-mixin template ObjectSetters() {
+template ObjectSetter() {
struct ObjectAbstractSet {
import std.conv : to;
- mixin Structs;
- ObjComposite contents_comment_new(in string object) {
- ObjComposite object_set;
- object_set.use = "comment";
- object_set.of = "comment";
- object_set.is_a = "comment";
- object_set.object = object;
- // does not have .attrib;
- // does not have .ocn
- return object_set;
- }
string[string] contents_comment(in string object) {
string[string] object_set;
object_set["use"] = "comment";
object_set["of"] = "comment";
object_set["is"] = "comment";
object_set["obj"] = object;
- return object_set;
- }
- ObjComposite contents_heading_new(
- in int type,
- in string object,
- in string attrib,
- in int ocn,
- in string lev,
- in string lvn,
- in string lcn,
- ) {
- ObjComposite object_set;
- object_set.use = "content";
- object_set.of = "para";
- object_set.is_a = "heading";
- object_set.object = object;
- object_set.ocn = (ocn==0) ? "" : to!string(ocn);
- object_set.attrib = attrib;
- object_set.heading.type = to!string(type);
- object_set.heading.lev = to!string(lev);
- object_set.heading.lvn = to!string(lvn);
- object_set.heading.lcn = to!string(lcn);
+ // object_set["attrib"] = attrib;
return object_set;
}
string[string] contents_heading(
in int type,
in string object,
in string attrib,
- in int ocn,
+ in int obj_cite_number,
in string lev,
- in string lvn,
- in string lcn,
+ in string lev_markup_number,
+ in string lev_collapsed_number,
) {
string[string] object_set;
- object_set["use"] = "content";
- object_set["of"] = "para";
- object_set["is"] = "heading";
- object_set["type"] = to!string(type);
- object_set["obj"] = object;
- object_set["ocn"] = (ocn==0) ? "" : to!string(ocn);
- object_set["lev"] = to!string(lev);
- object_set["lvn"] = to!string(lvn);
- object_set["lcn"] = to!string(lcn);
- object_set["attrib"] = attrib;
- return object_set;
- }
- ObjComposite contents_para_new(
- in string is_a,
- in string object,
- in string attrib,
- in int ocn,
- in string indent_first,
- in string indent_second,
- in bool bullet
- ) {
- ObjComposite object_set;
- object_set.use = "content";
- object_set.of = "para";
- object_set.is_a = "heading";
- object_set.object = object;
- object_set.ocn = (ocn==0) ? "" : to!string(ocn);
- object_set.attrib = attrib;
- object_set.para.indent_first = indent_first;
- object_set.para.indent_second = indent_second;
- object_set.para.bullet = to!string(bullet);
+ object_set["use"] = "content";
+ object_set["of"] = "para";
+ object_set["is"] = "heading";
+ object_set["type"] = to!string(type);
+ // object_set["is"] = type; // "heading" "heading_dummy"
+ object_set["obj"] = object;
+ object_set["obj_cite_number"] = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
+ object_set["lev"] = to!string(lev);
+ object_set["lev_markup_number"] = to!string(lev_markup_number);
+ object_set["lev_collapsed_number"] = to!string(lev_collapsed_number);
+ object_set["attrib"] = attrib;
+ // object_set["children"] = children;
return object_set;
}
string[string] contents_para(
in string is_a,
in string object,
in string attrib,
- in int ocn,
- in string indent_first,
- in string indent_second,
+ in int obj_cite_number,
+ in string[string] indent,
in bool bullet
) {
string[string] object_set;
- object_set["use"] = "content";
- object_set["of"] = "para";
- object_set["is"] = is_a;
- object_set["obj"] = object;
- object_set["ocn"] = (ocn==0) ? "" : to!string(ocn);
- object_set["indent_first"] = indent_first;
- object_set["indent_second"] = indent_second;
- object_set["bullet"] = to!string(bullet);
- object_set["attrib"] = attrib;
- return object_set;
- }
- ObjComposite contents_block_new(
- in string type,
- in string object,
- in string attrib,
- in int ocn
- ) {
- ObjComposite object_set;
- // does not have .attrib;
- object_set.use = "content";
- object_set.of = "block";
- object_set.is_a = type;
- object_set.object = object;
- object_set.ocn = (ocn==0) ? "" : to!string(ocn);
- object_set.attrib = attrib;
+ object_set["use"] = "content";
+ object_set["of"] = "para";
+ object_set["is"] = is_a;
+ // object_set["status"] = status;
+ object_set["obj"] = object;
+ object_set["obj_cite_number"] = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
+ object_set["indent_first"] = indent["first"];
+ object_set["indent_second"] = indent["second"];
+ object_set["bullet"] = to!string(bullet);
+ object_set["attrib"] = attrib;
return object_set;
}
string[string] contents_block(
in string type,
in string object,
in string attrib,
- in int ocn
+ in int obj_cite_number
) {
string[string] object_set;
- object_set["use"] = "content";
- object_set["of"] = "block";
- object_set["is"] = type;
- object_set["obj"] = object;
- object_set["ocn"] = (ocn==0) ? "" : to!string(ocn);
- object_set["attrib"] = attrib;
- return object_set;
- }
- ObjComposite contents_block_ocn_string_new(
- in string type,
- in string object,
- in string ocn,
- in string node
- ) {
- ObjComposite object_set;
- object_set.use = "content";
- object_set.of = "block";
- object_set.is_a = type;
- object_set.object = object;
- object_set.ocn = ocn;
- object_set.block_ocn_string.node = node;
- // object_set.attrib = attrib;
+ object_set["use"] = "content";
+ object_set["of"] = "block";
+ object_set["is"] = type;
+ object_set["obj"] = object;
+ object_set["obj_cite_number"] = (obj_cite_number==0) ? "" : to!string(obj_cite_number);
+ object_set["attrib"] = attrib;
return object_set;
}
- string[string] contents_block_ocn_string(
+ string[string] contents_block_obj_cite_number_string(
in string type,
in string object,
- in string ocn,
+ in string obj_cite_number,
in string node
) {
string[string] object_set;
- object_set["use"] = "content";
- object_set["of"] = "block";
- object_set["is"] = type;
- object_set["obj"] = object;
- object_set["ocn"] = ocn;
- object_set["node"] = node;
+ object_set["use"] = "content";
+ object_set["of"] = "block";
+ object_set["is"] = type;
+ object_set["obj"] = object;
+ object_set["obj_cite_number"] = obj_cite_number;
+ object_set["node"] = node;
+ // object_set["attrib"] = "";
return object_set;
}
}