Class RecursiveChildRange

Class Documentation

class RecursiveChildRange

Range wrapper for iterating all descendants recursively.

RecursiveChildRange provides a range-based for loop compatible wrapper around RecursiveChildIterator. Returned by Entity::descendants().

Example:
for (auto descendant : entity.descendants()) {
    // Process entire subtree in depth-first order
}

Public Functions

RecursiveChildRange(const Entity &entity)

Constructs a range for the entity’s entire subtree.

Parameters:

entity – The root entity

RecursiveChildIterator begin() const

Returns an iterator to the first descendant.

Returns:

Iterator positioned at the first descendant (depth-first), or end() if no descendants

RecursiveChildIterator end() const

Returns a sentinel iterator marking the end of descendants.

Returns:

End iterator