MCPcopy Create free account
hub / github.com/Illation/ETEngine / TopologicalSort

Method TopologicalSort

Engine/source/EtFramework/ECS/EcsController.cpp:764–779  ·  view source on GitHub ↗

------------------------------------------ EcsController::TopologicalSort Adds systems to the schedule in a valid order according to their dependencies

Source from the content-addressed store, hash-verified

762// Adds systems to the schedule in a valid order according to their dependencies
763//
764void EcsController::TopologicalSort(RegisteredSystem* const sys)
765{
766 if (!sys->scheduled)
767 {
768 ET_ASSERT(!(sys->visited), "Circular dependency detected!");
769
770 sys->visited = true;
771 for (RegisteredSystem* const dep : sys->dependencies)
772 {
773 TopologicalSort(dep);
774 }
775
776 sys->scheduled = true;
777 m_Schedule.emplace_back(sys);
778 }
779}
780
781
782} // namespace fw

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected