TypedPass.ixx File
State-filtered pass implementation for game loop phases. More...
Included Headers
#include <type_traits>
#include <utility>
#include <helios.engine.runtime.world.Session>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.runtime.world.SystemRegistry>
#include <helios.engine.runtime.gameloop:Pass>
#include <helios.engine.runtime.enginestate.types>
Namespaces Index
| namespace | helios |
| namespace | engine |
| namespace | runtime |
| namespace | gameloop |
Classes Index
| class | TypedPass<StateType> |
|
State-filtered pass that only executes in specific states. More... | |
Description
State-filtered pass implementation for game loop phases.
File Listing
The file content with the documentation metadata removed is:
22export namespace helios::engine::runtime::gameloop {
57 friend class helios::engine::runtime::gameloop::Phase;
62 Phase& owner_;
74 void update(helios::engine::runtime::world::UpdateContext& updateContext) override {
75 for (auto& sys : systemRegistry_.items()) {
76 sys->update(updateContext);
86 void init(helios::engine::runtime::world::GameWorld& gameWorld) override {
94 CommitPoint commitPoint_ = CommitPoint::None;
107 explicit TypedPass(Phase& owner, const StateType mask, helios::engine::runtime::world::GameWorld& gameWorld) : owner_(owner), mask_(mask), Pass(gameWorld) {}
137 Phase& addCommitPoint(const CommitPoint commitPoint = CommitPoint::PassEvents) override {
138 commitPoint_ = commitPoint;
154 [[nodiscard]] CommitPoint commitPoint() const noexcept override {
169 [[nodiscard]] bool shouldRun(helios::engine::runtime::world::UpdateContext& updateContext) const noexcept override {
170 auto state = updateContext.session().state<StateType>();
171 return hasFlag(mask_, state);
183 using U = std::underlying_type_t<StateType>;
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.