|
WSF
|
#include <WsfScriptStateMachine.hpp>
Public Member Functions | |
| Transition ()=default | |
| Transition (WsfStringId aNextStateName) | |
| Transition (const Transition &aSrc) | |
| virtual | ~Transition ()=default |
| virtual Transition * | Clone () const |
| virtual bool | Evaluate (WsfScriptContext &aContext) |
| int | GetNextStateIndex () const |
| void | SetNextStateIndex (int aNextStateIndex) |
| WsfStringId | GetNextStateName () const |
| virtual bool | Initialize (double aSimTime, WsfScriptContext &aContext) |
| virtual bool | ProcessInput (UtInput &aInput, WsfScriptContext &aContext, WsfStringId aNameSpace) |
Protected Attributes | |
| WsfStringId | mNextStateName |
| The name (ID) of next state. | |
| int | mNextStateIndex {0} |
| The index of the next state in the state machine. | |
| WsfStringId | mScriptName |
| The string ID of the name of the script that defines the transition rule. | |
| UtScript * | mScriptPtr {nullptr} |
A Transition represents a rule that can cause a transition into a new state. If the Evaluate() method returns true then the state machine should transition to the new state.
|
default |
References Transition().
Referenced by Clone(), Transition(), Transition(), and ~Transition().
|
explicit |
References mNextStateIndex, mNextStateName, mScriptName, and mScriptPtr.
| WsfScriptStateMachine::Transition::Transition | ( | const Transition & | aSrc | ) |
References mNextStateIndex, mNextStateName, mScriptName, mScriptPtr, and Transition().
|
virtualdefault |
References Clone(), Evaluate(), and Transition().
|
virtual |
A virtual 'copy constructor'. This must be provided by derived classes if they extend Transition.
References Transition().
Referenced by ~Transition().
|
virtual |
Evaluate the rule to determine if a transition should occur.
| aContext | The context for script execution. |
References WsfScriptContext::ExecuteScript(), and mScriptPtr.
Referenced by ~Transition().
|
inline |
References mNextStateIndex.
|
inline |
References mNextStateName.
|
virtual |
Initialize the transition rule.
| aSimTime | The current simulation time. |
| aContext | The context for script execution. |
References WsfScriptContext::FindScript(), mScriptName, mScriptPtr, and ok.
|
virtual |
Process input for the transition rule.
| aInput | The input stream. |
| aContext | The script context into which the scripts are to be entered. |
| aNameSpace | The string ID of the current state name. |
References WsfScriptContext::Compile(), mNextStateName, and mScriptName.
|
inline |
References mNextStateIndex.
|
protected |
The index of the next state in the state machine.
Referenced by GetNextStateIndex(), SetNextStateIndex(), Transition(), and Transition().
|
protected |
The name (ID) of next state.
Referenced by GetNextStateName(), ProcessInput(), Transition(), and Transition().
|
protected |
The string ID of the name of the script that defines the transition rule.
Referenced by Initialize(), ProcessInput(), Transition(), and Transition().
|
protected |
The script that defines the transition rule. Note that this script is 'owned' by the script context under which it was compiled.
Referenced by Evaluate(), Initialize(), Transition(), and Transition().