The piece tree editor was written against an AvlTree where the caller owned the node layout. It now runs on the shared AvlTree<Key, Data>: PieceKey is the key and keeps the piece span plus the cached spans of both subtrees, recomputed in updateNodeCache from the node's Piece. Lookup by text position descends with keyInRightSubtree, so the tree again uses relative keys in findSubTree. AvlTree gains positional operations needed for a sequence tree whose keys are implicit: insertAfter, removeNode, refreshNode and next/prev in-order traversal. The editor uses these instead of a hand-kept linked list and insertion flags. The module lives in TextEditor/ with its own library and a UnitTest++ suite, including a randomized comparison against std::string. Strings/tests/tests.cpp came from the old branch and included a header that no longer exists, so it is removed. |
||
|---|---|---|
| .. | ||
| AVLTree.ipp | ||
| Containers.cpp | ||
| linear_ring.cpp | ||