bevy/crates/bevy_ecs/src/schedule
Christian Hughes 2be3bc5310
Improve node encapsulation in ScheduleGraph (#20119)
# Objective

- Part of #20115

We want to encapsulate each part of `ScheduleGraph` into its own
specific struct to make parts of it easier to reuse and maintain.

## Solution

- Pulled `ScheduleGraph::systems` and `ScheduleGraph::system_conditions`
into a `Systems` struct and added a field for this new struct to
`ScheduleGraph`
- Broke up `ScheduleGraph::uninit` into `Systems::uninit` and
`SystemSets::uninit` to eliminate `ScheduleGraph`'s direct field access
of these types
- Removed node and condition accessors from `ScheduleGraph`; the same
operations are now available on `Systems` and `SystemSets` instead
(accessible via their `pub` fields on `ScheduleGraph`)
- Moved `Systems`, `SystemSets`, `SystemNode`, `SystemWithAccess`, and
`ConditionWithAccess` into a separate file.

## Testing

Added two new tests covering the API surface of `Systems` and
`SystemSets`, respectively.

---------

Co-authored-by: Chris Russell <8494645+chescock@users.noreply.github.com>
2025-07-15 06:29:52 +00:00
..
executor Improve node encapsulation in ScheduleGraph (#20119) 2025-07-15 06:29:52 +00:00
graph Use SlotMaps to store systems and system sets in Schedules (#19352) 2025-07-03 18:50:54 +00:00
auto_insert_apply_deferred.rs Improve node encapsulation in ScheduleGraph (#20119) 2025-07-15 06:29:52 +00:00
condition.rs Split BufferedEvent from Event (#20101) 2025-07-14 21:31:48 +00:00
config.rs Have System::run_unsafe return Result. (#19145) 2025-07-03 21:48:09 +00:00
mod.rs Improve node encapsulation in ScheduleGraph (#20119) 2025-07-15 06:29:52 +00:00
node.rs Improve node encapsulation in ScheduleGraph (#20119) 2025-07-15 06:29:52 +00:00
pass.rs Use SlotMaps to store systems and system sets in Schedules (#19352) 2025-07-03 18:50:54 +00:00
schedule.rs Improve node encapsulation in ScheduleGraph (#20119) 2025-07-15 06:29:52 +00:00
set.rs Have System::run_unsafe return Result. (#19145) 2025-07-03 21:48:09 +00:00
stepping.rs Use SlotMaps to store systems and system sets in Schedules (#19352) 2025-07-03 18:50:54 +00:00