Private Member Functions | |
| void | HFSMBase (FSMStateBase ownerState=NULL) |
| FSMStateBase | GetCurrentState () |
| void | SetCurrentState (FSMStateBase state) |
| FSMStateBase | GetOwnerState () |
| bool | GetHierarchyPath (FSMStateBase state, out array< FSMStateBase > path) |
| returns hierarchic state (path to root) of a state | |
| void | SetInitialState (FSMStateBase initial_state) |
| void | AddTransition (FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > t) |
| adds transition into transition table | |
| void | Start (FSMEventBase initial_event=NULL, bool useExistingState=false) |
| starts the state machine by entering the initial_state (using intial_event as argument to initial state's onEntry) | |
| bool | IsRunning () |
| returns true if machine is in running state | |
| void | Terminate (FSMEventBase terminal_event=NULL) |
| terminates the state machine | |
| void | Abort (FSMEventBase abort_event=NULL) |
| void | Update (float dt) |
| if machine running, call OnUpdate() on current state | |
| protected ProcessEventResult | ProcessAbortTransition (FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > t, FSMEventBase e) |
| FSMStateBase | FindAbortDestinationState (FSMEventBase e) |
| i | |
| FSMStateBase | ProcessAbortEvent (FSMEventBase e, out ProcessEventResult result) |
| instructs the hierarchical state machine to process the event e | |
| ProcessEventResult | ProcessEvent (FSMEventBase e) |
| instructs the hierarchical state machine to process the event e | |
| protected int | FindFirstUnguardedTransition (FSMEventBase e) |
| FSMStateBase | FindTransitionState (FSMStateBase s, FSMEventBase e) |
| FSMStateBase | FindGuardedTransitionState (FSMStateBase s, FSMEventBase e) |
| protected int | FindFirstCompletionTransition () |
| protected ProcessEventResult | ProcessLocalTransition (FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > t, FSMEventBase e) |
| instructs the state machine to process the event locally - no hierarchy is crossed | |
| protected ProcessEventResult | LocalTransition (int i, FSMEventBase e) |
| protected ProcessEventResult | ProcessCompletionTransitions () |
Private Attributes | |
| protected ref FSMStateBase | m_State |
| protected FSMStateBase | m_OwnerState |
| current fsm state | |
| protected ref FSMStateBase | m_InitialState |
| state that owns this fsm (or null if root) | |
| protected ref array< ref FSMTransition< FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase > > | m_Transitions = new array<ref FSMTransition<FSMStateBase, FSMEventBase, FSMActionBase, FSMGuardBase>> |
| configurable initial state of the machine | |
| protected bool | m_HasCompletions = false |
| fsm transition table | |
|
inlineprivate |
|
inlineprivate |
References fsmDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), IsRunning(), m_State, ToString(), and string::ToString().
|
inlineprivate |
adds transition into transition table
References Print().
|
inlineprivate |
i
| [in] | e | event that will be used to find suitable transition from current state |
References fsmDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), m_State, ToString(), string::ToString(), and Type.
|
inlineprivate |
References IsRunning(), and m_State.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
References m_State.
|
inlineprivate |
returns hierarchic state (path to root) of a state
| [in] | state | state the path is starting |
| [out] | path | current hierarchic state |
References string::Insert(), and path.
|
inlineprivate |
|
inlineprivate |
returns true if machine is in running state
References m_State.
|
inlineprivate |
|
inlineprivate |
instructs the hierarchical state machine to process the event e
| [in] | e | event that will be used to find suitable transition from current state |
References fsmDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), m_State, ToString(), string::ToString(), and Type.
|
inlineprivate |
References fsmDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), and m_State.
|
inlineprivate |
References Error().
|
inlineprivate |
instructs the hierarchical state machine to process the event e
| [in] | e | event that will be used to find suitable transition from current state |
References Error(), fsmDebugPrint(), fsmDebugSpam(), LogManager::IsInventoryHFSMLogEnable(), LogManager::IsWeaponLogEnable(), m_State, ToString(), string::ToString(), and Type.
|
inlineprivate |
instructs the state machine to process the event locally - no hierarchy is crossed
| [in] | t | the transition in m_Transitions |
| [in] | e | event that will be used to process transition from current state |
References fsmDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), and m_State.
|
inlineprivate |
References m_State.
|
inlineprivate |
| [in] | initial_state | state the machine will be entered to after Start() |
| [in] | initial_event | event that will be used to start the machine |
|
inlineprivate |
starts the state machine by entering the initial_state (using intial_event as argument to initial state's onEntry)
| [in] | e | optional event for starting the machind |
References fsmDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), m_State, ToString(), and string::ToString().
|
inlineprivate |
terminates the state machine
References fsmDebugPrint(), LogManager::IsInventoryHFSMLogEnable(), IsRunning(), m_State, ToString(), and string::ToString().
|
inlineprivate |
if machine running, call OnUpdate() on current state
References IsRunning(), and m_State.
|
private |
fsm transition table
|
private |
state that owns this fsm (or null if root)
|
private |
current fsm state
|
private |
|
private |
configurable initial state of the machine