StateTransitionRule.ixx File
Definition of a state transition rule. More...
Included Headers
#include <functional>
#include <helios.engine.runtime.world.UpdateContext>
#include <helios.engine.state.types.StateTransitionType>
#include <helios.engine.state.types.StateTransitionId>
#include <helios.engine.state.types.StateTransitionRequest>
Namespaces Index
| namespace | helios |
| namespace | engine |
|
Main engine module aggregating core infrastructure and game systems. More... | |
| namespace | state |
|
Generic, template-based state management system. More... | |
| namespace | types |
|
Type definitions for state transitions. More... | |
Classes Index
| class | StateTransitionRule<StateType> |
|
Defines a valid state transition with optional guard. More... | |
Description
Definition of a state transition rule.
File Listing
The file content with the documentation metadata removed is:
18export namespace helios::engine::state::types {
29 using GuardCallback = bool(*)(
31 const StateTransitionRequest<StateType>
47 class StateTransitionRule {
69 GuardCallback<StateType> guard_ = nullptr;
81 constexpr StateTransitionRule(
82 const StateType from,
83 const StateTransitionIdType transitionId,
84 const StateType to,
85 GuardCallback<StateType> guard = nullptr
86 ) : from_(from), transitionId_(transitionId), to_(to) {
87 if (guard != nullptr) {
88 guard_ = std::move(guard);
113 [[nodiscard]] StateTransitionIdType transitionId() const noexcept {
122 [[nodiscard]] GuardCallback<StateType> guard() const noexcept {
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.