- append
void append(BaseElement e)
Insert element at the back.
- clearChildren
void clearChildren()
Remove all children and clear line separation.
- indent
string indent(string s, int parent_level, int level)
Render content with an indentation that takes the parent in
consideration.
- prepend
void prepend(BaseElement e)
Insert element at the front.
- render
string render()
Undocumented in source. Be warned that the author may not have intended to support it.
- renderIndent
string renderIndent(int parent_level, int level)
Undocumented in source. Be warned that the author may not have intended to support it.
- renderPostRecursive
string renderPostRecursive(int parent_level, int level)
Undocumented in source. Be warned that the author may not have intended to support it.
- renderRecursive
string renderRecursive(int parent_level, int level)
Undocumented in source. Be warned that the author may not have intended to support it.
- reset
BaseModule reset()
Clear the node of childrens.
- sep
void sep(int count)
Separate with at most count empty lines.
- setIndentation
void setIndentation(int ind)
Sets the width of the indentation
- suppressIndent
void suppressIndent(int levels)
Set indent suppression from this point and all children.
- suppressThisIndent
void suppressThisIndent(int levels)
Suppress indentation by also affecting the level propagated from the parent.
Common functionality for modules.
Support indentation. Children structure. Recursive rendering of content + children. Line separation independent of accidental sep().
TODO refactor, lessen the coupling by moving functionality to pure, free functions. TODO refactor, use a GC-less allocator like Array. TODO refactor, toString to support the range versions with a sink.