This is possibly the most important function in this entire program. The
role of this function is to determine which parts of a node will have
precedence over nodes currently in a Logoot binary search tree. Any new
node must be filtered to determine which parts can actually make it into
the document. For example, if there is a node with a higher
currently in the BST, that portion that overlaps with the node must be cut
out. If the reverse is true, the node must be removed. This is done by
first filtering the nodes in the region in question using a user-defined
priority function. Nodes are either kept, ignored, or removed. These nodes
are then used as regions of the input to skip over (variable named
skip_ranges) and the resulting node(s) are returned.
The binary search tree containing current nodes to consider
The start of the region in question
The length of the region in question
A callback function determining what happens to a
node currently in the BST in the region in question. If it returns 1, the
node is kept. If it is 0, the node is ignored and is not skipped over. If
it is -1, the section in question of the node is removed and the
informRemoval function is called so further removals can be performed.
A function only called when a node is split into pieces and additional nodes must be added as side-effects of the operation.
A function to be called when a section or all of a node is removed so that the caller can modify the document as necessary.
Generated using TypeDoc