guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
guillaume::ecs::ReverseLevelOrderTraveler Class Referencefinal

Visits owned entities before their owners: the deepest entities first, the entities owned by the scene last. More...

#include <headers/guillaume/ecs/reverse_level_order_traveler.hpp>

Inheritance diagram for guillaume::ecs::ReverseLevelOrderTraveler:
Collaboration diagram for guillaume::ecs::ReverseLevelOrderTraveler:

Public Member Functions

std::vector< std::shared_ptr< Entity > > travel (EntityRegistry &entityRegistry) const override
 List every entity below a registry, children before parents.
std::vector< std::shared_ptr< const Entity > > travel (const EntityRegistry &entityRegistry) const override
 List every entity below a registry, children before parents, read-only.
Public Member Functions inherited from guillaume::ecs::EntityTreeTraveler
virtual ~EntityTreeTraveler (void)=default
 Virtual destructor.

Detailed Description

Visits owned entities before their owners: the deepest entities first, the entities owned by the scene last.

It is the exact reverse of LevelOrderTraveler. For a scene owning A and B, where A owns A1 and A2 and B owns B1, the order is B1, A2, A1, B, A. Used by the Measure phase, where a parent is sized from its children, and by the Event phase, where the input handlers of a child run before those of its parent.

See also
LevelOrderTraveler
EventPhase
MeasurePhase

Definition at line 44 of file reverse_level_order_traveler.hpp.

Member Function Documentation

◆ travel() [1/2]

std::vector< std::shared_ptr< const Entity > > guillaume::ecs::ReverseLevelOrderTraveler::travel ( const EntityRegistry & entityRegistry) const
overridevirtual

List every entity below a registry, children before parents, read-only.

Parameters
entityRegistryThe registry to start from, usually the scene.
Returns
The entities from the deepest level to the root level, each level in reverse insertion order; empty when the registry owns nothing.

Implements guillaume::ecs::EntityTreeTraveler.

Definition at line 41 of file reverse_level_order_traveler.cpp.

Here is the call graph for this function:

◆ travel() [2/2]

std::vector< std::shared_ptr< Entity > > guillaume::ecs::ReverseLevelOrderTraveler::travel ( EntityRegistry & entityRegistry) const
overridevirtual

List every entity below a registry, children before parents.

Parameters
entityRegistryThe registry to start from, usually the scene.
Returns
The entities from the deepest level to the root level, each level in reverse insertion order; empty when the registry owns nothing.

Implements guillaume::ecs::EntityTreeTraveler.

Definition at line 33 of file reverse_level_order_traveler.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: