Skip to content
This repository was archived by the owner on Nov 16, 2025. It is now read-only.

StateBase ctor()

ged edited this page Sep 10, 2024 · 2 revisions

Definition

Initializes a StateBase instance that has a specified enter, update and exit callbacks.

template<class TContext>
StateBase(StateCallback<TContext> enter, StateCallback<TContext> update, StateCallback<TContext> exit)

Type Parameters

  • TContext: The type of the context, which holds data or behavior relevant to the state machine.

Parameters

  • enter: A function pointer to be executed when the state enters.
  • update: A function pointer to be executed when the state updates.
  • exit: A function pointer to be executed when the state exits.

Remarks

This constructor is marked as protected, meaning it can only be called by derived classes.

Clone this wiki locally