Class FSMState#
Defined in File FSM.h
Inheritance Relationships#
Base Type#
public Karana::Core::Base(Class Base)
Class Documentation#
-
class FSMState : public Karana::Core::Base#
Represents a state in an FSM.
This is a node in the graph that makes up an FSM.
Public Functions
-
FSMState(std::string_view name, const kc::ks_ptr<FSM> &fsm)#
FSMState constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.
-
std::vector<kc::ks_ptr<FSMTransition>> getChildTransitions()#
Get all the transitions that connect this state to its children.
- Returns:
All the transitions that connect this state to its children.
-
std::vector<kc::ks_ptr<FSMTransition>> getParentTransitions()#
Get all the transitions that connect this state to its parents.
- Returns:
All the transitions that connect this state to its parents.
-
virtual std::string dumpString(std::string_view prefix = "", const Karana::Core::Base::DumpOptions *options = nullptr) const override#
Return information about the object.
- Parameters:
prefix – A string to use as prefix for each output line
options – Struct with options to tailor the output
- Returns:
String with the information about the object.
Public Members
-
Karana::Core::CallbackRegistry<void> on_enter_fns#
Functions that execute when entering the state.
-
Karana::Core::CallbackRegistry<void> on_exit_fns#
Functions that execute when exiting the state.
-
Karana::Core::CallbackRegistry<void> during_fns#
Functions that execute during the state.
-
FSMState(std::string_view name, const kc::ks_ptr<FSM> &fsm)#