This repository was archived by the owner on Nov 16, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
StateBase
ged edited this page Sep 10, 2024
·
2 revisions
A base structure representing a state in the state machine, with callback support for entering, updating and exiting the state.
struct StateBase;-
StateBase(StateCallback<TContext>, StateCallback<TContext>, StateCallback<TContext>)- Initializes a
StateBase<TContext>instance that has a specified enter, update, and exit callbacks.
- Initializes a
-
is(StateStatus)- Checks the current state status.
-
enter(TContext* const)- Executes the state's "enter" callback.
-
update(TContext* const)- Executes the state's "update" callback.
-
exit(TContext* const)- Executes the state's "exit" callback.
Common Types
→ StateStatus (enum)
→ StateCallback (alias)
Finite State Machine (FSM)
→ State
→ ctor()
→ isInState()
→ transitionTo()
→ update()
Hierarchical State Machine (HSM)
→ State
→ ctor()
→ isInState()
→ transitionTo()
→ update()
State Base
→ ctor()
→ is()
→ enter()
→ update()
→ exit()
State Machine Handler
→ ctor()
→ getNextState()
→ getActiveState()
→ isInState()
→ setNextState()
→ queueTransition()
→ beginTransitionQueue()
→ endTransitionQueue()
→ execute()