Skip to content

GTree: add an ability to iterate over a tree and a node-based API

Maciej S. Szmigiero requested to merge (removed):gtree-add-iterators into master

The basic API that this patch series adds allows in-order iterating over a GTree: getting the first and the last node in a tree, moving to the previous or the next in-order node. Variants of the already existing search or traversal functions were also implemented which return pointer to a particular node instead of just returning the value that is stored at this node.

Additionally, the so called "lower bound" and "upper bound" operations were also implemented and their tests added to the test framework. These are useful for implementing a tree of ranges that are automatically merged when adjacent to or overlapping each other (STL "map" also has these operations).

Merge request reports