|
WSF
|
#include <WsfScriptContext.hpp>

Classes | |
| class | ExecuteTimedEventScript |
| An event to execute a script at a specified time. More... | |
Public Member Functions | |
| WsfScriptContext (UtScriptEnvironment *aTypesPtr) | |
| WsfScriptContext (WsfScriptContext &aParentContext, WsfStringId aPartClassName, const std::string &aPartVarName) | |
| WsfScriptContext (WsfScriptContext &aParentContext, WsfStringId aObjectClassName) | |
| WsfScriptContext (const WsfScriptContext &aSrc) | |
| Copy constructor. | |
| WsfScriptContext & | operator= (const WsfScriptContext &aRhs) |
| virtual | ~WsfScriptContext () |
| virtual bool | Initialize (double aSimTime, WsfPlatform *aPlatformPtr, WsfPlatformPart *aPartPtr) |
| virtual bool | Initialize (WsfSimulation &aSimulation, void *aObjectPtr) |
| virtual bool | Initialize (double aSimTime, WsfScriptContext &aParentContext, void *aObjectPtr) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual bool | InitializeGlobalContext (WsfSimulation &aSimulation) |
| Initialize the global script context. | |
| virtual bool | ProcessInput (UtInput &aInput) |
| virtual void | Update (double aSimTime) |
| Invoke the 'on_update' script if it is defined. | |
| UtScript * | Compile (UtInput &aInput, const std::string &aEndBlockToken="end_script", const std::string &aNamespace="") |
| UtScript * | Compile (const std::string &aScriptName, WsfStringId aScriptReturnType, UtInput &aInput, const std::string &aEndBlockToken="end_script", const std::string &aNamespace="", bool aIsVariableBlock=false) |
| UtScript * | CompileImplicitScript (UtInput &aInput, const std::string &aName, WsfStringId aReturnType) |
| void | CompileVariables (UtInput &aInput) |
| void | DeclareVariable (WsfStringId aType, const std::string &aName) |
| bool | ExecuteScript (double aSimTime, WsfStringId aScriptName) |
| void | ExecuteScript (double aSimTime, UtScript *aScriptPtr) |
| bool | ExecuteScript (double aSimTime, WsfStringId aScriptName, UtScriptData &aScriptRetVal, const UtScriptDataList &aScriptArgs) |
| void | ExecuteScript (double aSimTime, UtScript *aScriptPtr, UtScriptData &aScriptRetVal, const UtScriptDataList &aScriptArgs) |
| void | ExecuteScript (UtScript *aScriptPtr, UtScriptData &aScriptRetVal, const UtScriptDataList &aScriptArgs) |
| bool | ExecuteScript (double aSimTime, UtScriptData &aScriptRetVal, const UtScriptDataList &aScriptArgs, const std::string &aScriptSource) |
| virtual UtScript * | FindScript (WsfStringId aScriptName) const |
| UtScriptContext & | GetContext () const |
| Return a reference to the real script context. | |
| WsfScriptContext & | GetGlobalContext () |
| UtScriptTypes * | GetTypes () const |
| Return a pointer to the UtScriptTypes object. | |
| UtScriptEnvironment * | GetEnvironment () const |
| Return a pointer to the UtScriptEnvironment object. | |
| UtScriptClass * | GetClass (const std::string &aClassName) const |
| Return a pointer to the script class object given its class name. | |
| UtScriptClass * | GetClass (WsfStringId aClassName) const |
| Return a pointer to the script class object given its class name (ID). | |
| UtScriptClass * | GetClass (const char *aClassName) const |
| Return a pointer to the script class object given its class name. | |
| bool | HasUpdateHandler () const |
| Return 'true' if an 'on_update' script is defined. | |
| void | SetParent (WsfScriptContext *aParentPtr) |
| void | SetParent (UtScriptContext *aParentPtr) |
| bool | ValidateScript (UtScript *aScriptPtr, WsfStringId aReturnType, const std::string &aArgumentTypes) const |
| WsfPlatformPart * | GetPart () |
| WsfSimulation * | GetSimulation () const |
| const WsfScenario * | GetScenario () const |
| UtScriptExecutor * | GetExecutor () const |
Static Public Member Functions | |
| static double | GetTIME_NOW (const UtScriptContext &aContext) |
| static WsfPlatform * | GetPLATFORM (const UtScriptContext &aContext) |
| static WsfProcessor * | GetPROCESSOR (const UtScriptContext &aContext) |
| static WsfMessage * | GetMESSAGE (const UtScriptContext &aContext) |
| static WsfTrack * | GetTRACK (const UtScriptContext &aContext) |
| static WsfSimulation * | GetSIMULATION (const UtScriptContext &aContext) |
| static WsfScenario * | GetSCENARIO (const UtScriptContext &aContext) |
| static WsfEventPipeInterface * | GetEVENTPIPE (const UtScriptContext &aContext) |
Protected Member Functions | |
| UtScriptData | GetSimTimeP () |
| bool | AddTimedEvents (double aSimTime) |
| Add events to invoke scripts at the requested time. | |
| void | CallScript (UtScript *aScriptPtr, UtScriptData &aScriptRetVal, const UtScriptDataList &aScriptArgs) |
| Calls a script, with optional call tracing. | |
| void | PostCompile (UtInput &aInput, UtScript *aRawScriptPtr) |
| Perform common operations after attempted compilation. | |
| void | WriteErrorHeader (UtScript *aScriptPtr) const |
Protected Attributes | |
| WsfScriptContext * | mParentPtr {nullptr} |
| Pointer to my immediate parent WsfScriptContext (nullptr if the global context). | |
| std::unique_ptr< UtScriptContext > | mContextPtr |
| The real UtScriptContext that is associated with this object. | |
| std::vector< TimedEvent > | mTimedEvents |
| WsfSimulation * | mSimulationPtr {nullptr} |
| WsfPlatform * | mPlatformPtr {nullptr} |
| If not the global context, this is the pointer to the associated platform. | |
| WsfPlatformPart * | mPlatformPartPtr {nullptr} |
| If the context is for a platform part, this is its pointer. | |
| WsfStringId | mPartClassName {} |
| The platform part class name. | |
| WsfStringId | mPartVarName {} |
| The platform part variable name. | |
| WsfStringId | mObjectClassName {} |
| The class name for a non-platform oriented object. | |
| std::unique_ptr< ReadTIME_NOW > | mTimeNowFunctionPtr |
| UtScript * | mOnUpdateScriptPtr {nullptr} |
| bool | mScriptCallTrace {false} |
| 'true' if call tracing is enabled. | |
| bool | mUserDefinedScriptCallTrace {false} |
| 'true' if the user defined a value for script_call_trace | |
| bool | mScriptPrintCode {false} |
| 'true' if script_print_code is enabled (prints the generated code after compiled) | |
| bool | mScriptCheckError {false} |
| bool | mScriptExpectError {false} |
| The value of 'script_expect_error'. | |
A common implementation for scripting on a platform or a platform part.
This class encapsulates many of the conventions that need to be followed for implementing scripting on a platform or a platform part. In particular, it provides the following:
The user of this class is responsible for the following:
| WsfScriptContext::WsfScriptContext | ( | UtScriptEnvironment * | aTypesPtr | ) |
Construct the global script context. The global script context is like any other script context except that it is not associated with a specific platform or processor.
References mContextPtr.
Referenced by WsfScriptContext::ExecuteTimedEventScript::ExecuteTimedEventScript(), GetGlobalContext(), Initialize(), operator=(), SetParent(), WsfScriptContext(), WsfScriptContext(), WsfScriptContext(), and ~WsfScriptContext().
| WsfScriptContext::WsfScriptContext | ( | WsfScriptContext & | aParentContext, |
| WsfStringId | aPartClassName, | ||
| const std::string & | aPartVarName ) |
Construct a script context for a platform or a platform part.
| aParentContext | The script context of the parent object. |
| aPartClassName | The script class name (e.g.: WsfProcessor) of the host platform part. If the string is empty then no host script variable will be defined. |
| aPartVarName | The script variable name (e.g.: PROCESSOR) through which the script object will be referenced. |
References GetEnvironment(), mContextPtr, mPartClassName, mPartVarName, and WsfScriptContext().
| WsfScriptContext::WsfScriptContext | ( | WsfScriptContext & | aParentContext, |
| WsfStringId | aObjectClassName ) |
Construct a script context for a global object (i.e.: not associated with a platform or platform part).
| aParentContext | The script context of the parent object. |
| aObjectClassName | The script class name (e.g.: WsfPlatform) of the object. |
References GetEnvironment(), mContextPtr, mObjectClassName, SetParent(), and WsfScriptContext().
| WsfScriptContext::WsfScriptContext | ( | const WsfScriptContext & | aSrc | ) |
Copy constructor.
References mContextPtr, mObjectClassName, mOnUpdateScriptPtr, mParentPtr, mPartClassName, mPartVarName, mPlatformPartPtr, mPlatformPtr, mScriptCallTrace, mScriptCheckError, mScriptExpectError, mScriptPrintCode, mSimulationPtr, mTimedEvents, mTimeNowFunctionPtr, mUserDefinedScriptCallTrace, and WsfScriptContext().
|
virtualdefault |
|
protected |
Add events to invoke scripts at the requested time.
References WsfSimulation::AddEvent(), GetGlobalContext(), WsfSimulation::GetScriptRandom(), GetSimulation(), mPlatformPartPtr, mPlatformPtr, mTimedEvents, ok, and simTime.
Referenced by Initialize(), Initialize(), and InitializeGlobalContext().
|
protected |
Calls a script, with optional call tracing.
References classPtr, GetExecutor(), GetSimTimeP(), mContextPtr, mPlatformPartPtr, mPlatformPtr, and mScriptCallTrace.
Referenced by ExecuteScript(), ExecuteScript(), ExecuteScript(), ExecuteScript(), ExecuteScript(), ExecuteScript(), Initialize(), Initialize(), Initialize2(), InitializeGlobalContext(), and Update().
| UtScript * WsfScriptContext::Compile | ( | const std::string & | aScriptName, |
| WsfStringId | aScriptReturnType, | ||
| UtInput & | aInput, | ||
| const std::string & | aEndBlockToken = "end_script", | ||
| const std::string & | aNamespace = "", | ||
| bool | aIsVariableBlock = false ) |
Compiles the script using the provided script context and script name and return type.
| aScriptName | The name to give the script. |
| aScriptReturnType | The return type to use when compiling the script. |
| aInput | The input stream containing the script. |
| aEndBlockToken | The string that indicates the end of the script (e.g.: "end_script"). |
| aNamespace | A name that is prepended to the script name. |
| aIsVariableBlock | True if this block is a 'script_variables' block This is useful to deconflict script's with the same name. |
| An | exception if a compile error occurs. |
References mContextPtr, and PostCompile().
| UtScript * WsfScriptContext::Compile | ( | UtInput & | aInput, |
| const std::string & | aEndBlockToken = "end_script", | ||
| const std::string & | aNamespace = "" ) |
Compile a script and add it to the list of managed scripts.
| aInput | The input stream containing the script. |
| aEndBlockToken | The string that indicates the end of the script (e.g.: "end_script"). |
| aNamespace | A name that is prepended to the script name. This is useful to deconflict script's with the same name. |
| An | exception if a compile error occurs. |
References mContextPtr, and PostCompile().
Referenced by CompileImplicitScript(), CompileVariables(), ExecuteScript(), wsf::cyber::Protect::ProtectedAttack::ProcessInput(), WsfGuidanceComputer::Phase::ProcessInput(), WsfMessageProcessor::Action::ProcessInput(), WsfMessageProcessor::Selector::ProcessInput(), ProcessInput(), WsfScriptStateMachine::Transition::ProcessInput(), and ~WsfScriptContext().
| UtScript * WsfScriptContext::CompileImplicitScript | ( | UtInput & | aInput, |
| const std::string & | aName, | ||
| WsfStringId | aReturnType ) |
Compile a implicit script and add it to the list of managed scripts. An 'implicit' script is one that is defined without using an explicit script/end_script block. Implicit scripts are things like 'on_update', 'on_initiate', 'next_state', etc. They take no arguments and the return type if defined implicitly.
| aInput | The input stream containing the script to be compiled. |
| aName | The name of the implicit script. |
| aReturnType | The return type from the script ("void", "bool", etc.) |
References Compile().
Referenced by ProcessInput(), WsfWeaponEffects::ProcessInput(), and ~WsfScriptContext().
| void WsfScriptContext::CompileVariables | ( | UtInput & | aInput | ) |
Compiles the variable list, which may be any combination of variable declarations and assignments.
| aInput | The input stream containing the script. |
| An | exception if a compile error occurs. |
References Compile().
Referenced by ProcessInput(), and ~WsfScriptContext().
| void WsfScriptContext::DeclareVariable | ( | WsfStringId | aType, |
| const std::string & | aName ) |
Declare a variable in the script context if it already hasn't been declared.
| aType | The variable type. |
| aName | The name of the variable. |
References mContextPtr.
Referenced by IADSC2ScenarioExtension::AddedToScenario(), and ~WsfScriptContext().
| void WsfScriptContext::ExecuteScript | ( | double | aSimTime, |
| UtScript * | aScriptPtr ) |
Execute a script.
| aSimTime | The current simulation time. |
| aScriptPtr | The pointer to the script to execute. |
References CallScript().
| void WsfScriptContext::ExecuteScript | ( | double | aSimTime, |
| UtScript * | aScriptPtr, | ||
| UtScriptData & | aScriptRetVal, | ||
| const UtScriptDataList & | aScriptArgs ) |
Execute a script.
| aSimTime | The current simulation time. |
| aScriptPtr | The pointer to the script to execute. |
| aScriptRetVal | The return value from the script. |
| aScriptArgs | The arguments to be passed to script. |
References CallScript().
| bool WsfScriptContext::ExecuteScript | ( | double | aSimTime, |
| UtScriptData & | aScriptRetVal, | ||
| const UtScriptDataList & | aScriptArgs, | ||
| const std::string & | aScriptSource ) |
Execute a script
| aSimTime | The current simulation time. |
| aScriptRetVal | The return value from the script. |
| aScriptArgs | The arguments to be passed to script. |
| aScriptSource | The source of the script in the format: <return-type> <name>(<arg-list>) ... script commands ... end_script |
References CallScript(), Compile(), and mContextPtr.
| bool WsfScriptContext::ExecuteScript | ( | double | aSimTime, |
| WsfStringId | aScriptName ) |
Execute a script.
| aSimTime | The current simulation time. |
| aScriptName | The name of the script to be executed. |
References CallScript(), mContextPtr, and success.
Referenced by WsfSimulation::AddInputPlatforms(), WsfSA_Perceive::AssetScore(), WsfSA_Assess::CalculateDefensiveness(), WsfSA_Assess::CalculateRisk(), WsfSA_Assess::CalculateUrgency(), WsfGuidedMoverBase::CallStagingEventScript(), WsfInterceptCalculator::CanIntercept(), checkDownCommandChain(), checkDownCommandChain(), checkUpCommandChain(), checkUpCommandChain(), WsfScriptStateMachine::Transition::Evaluate(), WsfScriptEvent::Execute(), WsfSA_Assess::ExecuteCalculateDefensiveness(), WsfSA_Assess::ExecuteCalculateEntityTargetValue(), WsfSA_Assess::ExecuteCalculateEntityThreatLevel(), WsfSA_Assess::ExecuteCalculateFlightRisk(), WsfSA_Assess::ExecuteCalculateGroupTargetValue(), WsfSA_Assess::ExecuteCalculateGroupThreatLevel(), WsfSA_Assess::ExecuteCalculateMissileTargetValue(), WsfSA_Assess::ExecuteCalculateMissileThreatLevel(), WsfSA_Assess::ExecuteCalculateMissionRisk(), WsfSA_Assess::ExecuteCalculatePackageRisk(), WsfSA_Assess::ExecuteCalculateRisk(), WsfSA_Assess::ExecuteCalculateSelfRisk(), WsfSA_Assess::ExecuteCalculateUrgency(), WsfSA_Assess::ExecuteCalcWeaponSupport(), WsfGuidanceComputer::Phase::ExecuteOnEntry(), WsfGuidanceComputer::Phase::ExecuteOnExit(), WsfGuidanceComputer::Phase::ExecuteOnUpdate(), WsfBMTrackScriptLocalHandler::Invoke(), WsfBMTrackScriptRemoteHandler::Invoke(), WsfMessageProcessor::Selector::Matches(), WsfWeaponEffects::ProcessEffectCommon(), WsfSA_Predict::ProjectPositionForward(), WsfSA_Predict::ProjectPositionGoToPoint(), WsfSA_Predict::ProjectPositionInTime(), WsfSA_Predict::ProjectPositionLevelTurn(), WsfSA_Predict::ProjectPositionRollAndPull(), WsfSA_Predict::ProjectPositionRollAndPull(), WsfSA_Predict::ProjectPositionSplitS(), WsfSA_Predict::ProjectPositionTurnToHeading(), WsfSA_Perceive::Prune(), WsfRIPRProcessor::QueryBid(), WsfSA_Perceive::ThreatScore(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and ~WsfScriptContext().
| bool WsfScriptContext::ExecuteScript | ( | double | aSimTime, |
| WsfStringId | aScriptName, | ||
| UtScriptData & | aScriptRetVal, | ||
| const UtScriptDataList & | aScriptArgs ) |
Execute a script.
| aSimTime | The current simulation time. |
| aScriptName | The name of the script to be executed. |
| aScriptRetVal | The return value from the script. |
| aScriptArgs | The arguments to be passed to script. |
References CallScript(), FindScript(), and success.
| void WsfScriptContext::ExecuteScript | ( | UtScript * | aScriptPtr, |
| UtScriptData & | aScriptRetVal, | ||
| const UtScriptDataList & | aScriptArgs ) |
Execute a script, using the current definition of the simulation time. This form is called by classes such as WsfScriptMessageHandler and WsfScriptStateMachine which have already set the simulation time. This avoids having to reset it.
| aScriptPtr | The pointer to the script to execute. |
| aScriptRetVal | The return value from the script. |
| aScriptArgs | The arguments to be passed to script. |
References CallScript().
|
virtual |
Find a script with the specified name (string form).
| aScriptName | The name of the script to be located. |
References mContextPtr.
Referenced by WsfSimulation::AddInputPlatforms(), WsfGuidedMoverBase::CallStagingEventScript(), WsfScriptObserver::EnableOrDisable(), WsfGuidanceComputer::Phase::ExecuteOnEntry(), WsfGuidanceComputer::Phase::ExecuteOnExit(), ExecuteScript(), WsfInterceptCalculator::GetInterceptCalculator(), WsfBMTrackScriptCallbackHandler::Initialize(), WsfGuidanceComputer::Phase::Initialize(), WsfMessageProcessor::Action::Initialize(), WsfMessageProcessor::Selector::Initialize(), WsfSA_Assess::Initialize(), WsfSA_Perceive::Initialize(), WsfSA_Predict::Initialize(), WsfScriptCallback::Initialize(), Initialize(), Initialize(), WsfScriptStateMachine::Transition::Initialize(), Initialize2(), InitializeGlobalContext(), WsfWeaponEffects::ProcessEffectCommon(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and ~WsfScriptContext().
| UtScriptClass * WsfScriptContext::GetClass | ( | const char * | aClassName | ) | const |
Return a pointer to the script class object given its class name.
References GetClass().
| UtScriptClass * WsfScriptContext::GetClass | ( | const std::string & | aClassName | ) | const |
Return a pointer to the script class object given its class name.
References mContextPtr.
Referenced by WsfSimulation::AddInputPlatforms(), WsfInterceptCalculator::CanIntercept(), GetClass(), WsfSA_Perceive::Initialize(), WsfBMTrackScriptLocalHandler::Invoke(), WsfBMTrackScriptRemoteHandler::Invoke(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
| UtScriptClass * WsfScriptContext::GetClass | ( | WsfStringId | aClassName | ) | const |
Return a pointer to the script class object given its class name (ID).
References mContextPtr.
|
inline |
Return a reference to the real script context.
References mContextPtr.
Referenced by WsfEventPipeInterface::AddedToSimulation(), WsfScriptCallback::Execute(), WsfXIO_ScriptService::HandleInformationRequest(), WsfBMTrackScriptCallbackHandler::Initialize(), WsfQuantumAllocatorScript::Initialize(), WsfQuantumEvaluatorScript::Initialize(), WsfQuantumGeneratorScript::Initialize(), WsfGuidanceComputer::Variable::ReadValue(), WsfGuidanceComputer::Variable::ReadValueOfType(), WsfVariableBase::ResolveReference(), WsfGuidanceComputer::Variable::Update(), WsfPerceptionProcessor::WsfPerceptionProcessor(), WsfScriptMessageHandler::WsfScriptMessageHandler(), and WsfScriptMessageHandler::WsfScriptMessageHandler().
| UtScriptEnvironment * WsfScriptContext::GetEnvironment | ( | ) | const |
Return a pointer to the UtScriptEnvironment object.
References mContextPtr.
Referenced by ValidateScript(), WsfScriptContext(), and WsfScriptContext().
|
static |
| UtScriptExecutor * WsfScriptContext::GetExecutor | ( | ) | const |
| WsfScriptContext & WsfScriptContext::GetGlobalContext | ( | ) |
References mParentPtr, and WsfScriptContext().
Referenced by AddTimedEvents().
|
static |
A helper method, which simplifies the process of extracting the value stored in the 'MESSAGE' variable.
| aContext | The script context that contains the 'MESSAGE' variable. |
|
inline |
References mPlatformPartPtr.
|
static |
A helper method, which simplifies the process of extracting the value stored in the 'PLATFORM' variable.
| aContext | The script context that contains the 'PLATFORM' variable. |
References platformPtr.
Referenced by WsfScriptAssetMessageClass::Create(), WsfScriptBMAssignmentMessageClass::Create(), WsfScriptBMAssignmentStatusClass::Create(), WsfScriptBMAssignmentTrackMessageClass::Create(), WsfScriptBMCueMessageClass::Create(), WsfScriptBMStatusMessageClass::Create(), WsfScriptMessageClass::Create(), WsfScriptSA_EntityMessage::Create(), WsfScriptTrackClass::Create(), WsfOrbitalScriptEvent::EvaluateCompletion(), WsfAdvancedBehaviorTree::GetOwningPlatform(), WsfVariableBase::ResolveReference(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
|
static |
A helper method, which simplifies the process of extracting the value stored in the 'PROCESSOR' variable.
| aContext | The script context that contains the 'PROCESSOR' variable. |
Referenced by WsfBMTrackScriptCallbackHandler::Initialize(), WsfInterceptCalculator::Initialize(), and WsfVariableBase::ResolveReference().
|
static |
Referenced by WsfScriptAssetManagerClass::Create(), WsfScriptAssetMapClass::Create(), WsfScriptBattleManagerClass::Create(), WsfScriptBMAssetRecordClass::Create(), WsfScriptBMAssignmentStatusClass::Create(), WsfScriptBMEvalAssignmentClass::Create(), WsfScriptBMStatusMessageClass::Create(), WsfScriptBrawlerProcessorClass::Create(), WsfScriptDisseminateC2Class::Create(), WsfScriptOrbitalConjunctionProcessor::Create(), WsfScriptOrbitalDynamics::Create(), WsfScriptPerceptionProcessor::Create(), WsfScriptQuantumTaskerProcessor::Create(), WsfScriptRIPRProcessorClass::Create(), WsfScriptSA_ProcessorClass::Create(), WsfScriptSensorsManagerClass::Create(), WsfScriptSensorsManagerFovClass::Create(), WsfScriptSimpleSensorsManagerClass::Create(), WsfScriptUnclassAssetManagerClass::Create(), WsfScriptUnclassBattleManagerClass::Create(), WsfScriptUnclassDisseminateC2Class::Create(), WsfScriptUplinkProcessor::Create(), WsfScriptWeaponsManagerAIClass::Create(), WsfScriptWeaponsManagerClass::Create(), WsfScriptWeaponsManagerSAMClass::Create(), WsfScriptWeaponThreatProcessorClass::Create(), GetScenario(), WsfVariableBase::ResolveReference(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD_NO_ARG_CHECK(), UT_DEFINE_SCRIPT_METHOD_NO_ARG_CHECK(), UT_DEFINE_SCRIPT_METHOD_NO_ARG_CHECK(), UT_DEFINE_SCRIPT_METHOD_NO_ARG_CHECK(), UT_DEFINE_SCRIPT_METHOD_NO_ARG_CHECK(), and UT_DEFINE_SCRIPT_METHOD_NO_ARG_CHECK().
| const WsfScenario * WsfScriptContext::GetScenario | ( | ) | const |
References GetSCENARIO(), mContextPtr, and mSimulationPtr.
|
protected |
References mSimulationPtr.
Referenced by CallScript().
|
static |
Referenced by WsfInterceptCalculator::CanIntercept(), WsfInterceptCalculator::CanIntercept(), WsfScriptAssetMessageClass::Create(), WsfScriptBMAssignmentMessageClass::Create(), WsfScriptBMAssignmentTrackMessageClass::Create(), WsfScriptBMCueMessageClass::Create(), WsfScriptBMTrackMessageClass::Create(), WsfScriptMessageClass::Create(), WsfScriptNASA_BreakupModel::Create(), WsfScriptRouteFinderClass::Create(), WsfScriptSA_EntityMessage::Create(), WsfScriptTerrainClass::Create(), WsfScriptTrackClass::Create(), WsfScriptZoneRouteFinderClass::Create(), WsfBMTrackScriptLocalHandler::Invoke(), WsfBMTrackScriptRemoteHandler::Invoke(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), and wsf::cyber::UT_DEFINE_SCRIPT_METHOD().
| WsfSimulation * WsfScriptContext::GetSimulation | ( | ) | const |
|
static |
A helper method, which simplifies the process of extracting the value stored in the 'TIME_NOW' variable.
Referenced by WsfScriptTrackClass::Create(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), wsf::comm::UT_DEFINE_SCRIPT_METHOD(), WsfPlatformScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfPlatformScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT(), and WsfTaskManagerScriptMethods::UT_DEFINE_SCRIPT_METHOD_EXT().
|
static |
A helper method, which simplifies the process of extracting the value stored in the 'TRACK' variable.
| aContext | The script context that contains the 'TRACK' variable. |
References trackPtr.
| UtScriptTypes * WsfScriptContext::GetTypes | ( | ) | const |
Return a pointer to the UtScriptTypes object.
References mContextPtr.
Referenced by WsfSA_Assess::CalculateDefensiveness(), WsfSA_Assess::CalculateRisk(), WsfSA_Assess::CalculateUrgency(), WsfSA_Assess::ExecuteCalculateEntityTargetValue(), WsfSA_Assess::ExecuteCalculateEntityThreatLevel(), WsfSA_Assess::ExecuteCalculateGroupTargetValue(), WsfSA_Assess::ExecuteCalculateGroupThreatLevel(), WsfSA_Assess::ExecuteCalculateMissileTargetValue(), WsfSA_Assess::ExecuteCalculateMissileThreatLevel(), WsfSA_Predict::ProjectPositionForward(), WsfSA_Predict::ProjectPositionGoToPoint(), WsfSA_Predict::ProjectPositionInTime(), WsfSA_Predict::ProjectPositionLevelTurn(), WsfSA_Predict::ProjectPositionRollAndPull(), WsfSA_Predict::ProjectPositionRollAndPull(), WsfSA_Predict::ProjectPositionSplitS(), and WsfSA_Predict::ProjectPositionTurnToHeading().
|
inline |
Return 'true' if an 'on_update' script is defined.
References mOnUpdateScriptPtr.
|
virtual |
Initialize the script context. This method performs all the necessary initialization of the script system and
| aSimTime | The current simulation time. |
| aPlatformPtr | The pointer to the platform with which the script context is associated. |
| aPartPtr | The pointer to the platform part with which the script context is associated. This must be zero if the script context is associated with the platform. |
References AddTimedEvents(), CallScript(), FindScript(), GetExecutor(), WsfSimulation::GetScriptContext(), WsfPlatform::GetSimulation(), mContextPtr, mOnUpdateScriptPtr, mParentPtr, mPartClassName, mPartVarName, mPlatformPartPtr, mPlatformPtr, mScriptCallTrace, mSimulationPtr, mUserDefinedScriptCallTrace, and ok.
Referenced by WsfBehaviorTree::Initialize(), Initialize(), and ~WsfScriptContext().
|
virtual |
|
virtual |
Initialize the script context for a non-platform oriented object. This method performs all the necessary initialization of the script system and
| aSimulation | The simulation . |
| aObjectPtr | The pointer to the object with which the script context is associated. |
References WsfSimulation::GetScriptContext(), WsfSimulation::GetSimTime(), and Initialize().
|
virtual |
Perform phase 2 initialization. This currently only invokes the 'on_initialize2' script if it is defined.
| aSimTime | The current simulation time. |
References CallScript(), and FindScript().
Referenced by ~WsfScriptContext().
|
virtual |
Initialize the global script context.
References AddTimedEvents(), CallScript(), FindScript(), GetExecutor(), mContextPtr, mSimulationPtr, mTimeNowFunctionPtr, and ok.
Referenced by WsfSimulation::Initialize(), and ~WsfScriptContext().
| WsfScriptContext & WsfScriptContext::operator= | ( | const WsfScriptContext & | aRhs | ) |
References mContextPtr, mObjectClassName, mOnUpdateScriptPtr, mParentPtr, mPartClassName, mPartVarName, mPlatformPartPtr, mPlatformPtr, mScriptCallTrace, mScriptCheckError, mScriptExpectError, mScriptPrintCode, mSimulationPtr, mTimedEvents, mTimeNowFunctionPtr, mUserDefinedScriptCallTrace, and WsfScriptContext().
|
protected |
Perform common operations after attempted compilation.
References mScriptCheckError, mScriptExpectError, mScriptPrintCode, and WriteErrorHeader().
|
virtual |
Determine if the current input command is a script-related command.
| aInput | The input stream. |
References Compile(), CompileImplicitScript(), CompileVariables(), mContextPtr, mScriptCallTrace, mScriptCheckError, mScriptExpectError, mScriptPrintCode, mTimedEvents, mUserDefinedScriptCallTrace, WsfVariable< T >::ReadValueOfType(), and WsfVariable< T >::ValueGreater().
Referenced by ~WsfScriptContext().
| void WsfScriptContext::SetParent | ( | UtScriptContext * | aParentPtr | ) |
Set the parent script context.
| aParentPtr | The desired parent context for this context. |
References mContextPtr.
| void WsfScriptContext::SetParent | ( | WsfScriptContext * | aParentPtr | ) |
Set the parent script context.
| aParentPtr | The desired parent context for this context. |
References mContextPtr, and WsfScriptContext().
Referenced by WsfAdvancedBehaviorTree::Initialize(), Initialize(), and WsfScriptContext().
|
virtual |
Invoke the 'on_update' script if it is defined.
References CallScript(), mOnUpdateScriptPtr, and mPlatformPtr.
| bool WsfScriptContext::ValidateScript | ( | UtScript * | aScriptPtr, |
| WsfStringId | aExpectedReturnType, | ||
| const std::string & | aExpectedArgumentTypes ) const |
Validate the script return type and argument list against the expected values.
| aScriptPtr | The point to the script that is to be checked. If this is zero then nothing is compared and true is returned. |
| aExpectedReturnType | The expected return type. |
| aExpectedArgumentTypes | The expected argument types as a comma-separated list. |
References GetEnvironment(), and WriteErrorHeader().
Referenced by WsfSimulation::AddInputPlatforms(), WsfInterceptCalculator::GetInterceptCalculator(), WsfBMTrackScriptCallbackHandler::Initialize(), WsfSA_Assess::Initialize(), WsfSA_Perceive::Initialize(), WsfSA_Predict::Initialize(), WsfWeaponEffects::ProcessEffectCommon(), wsf::cyber::Protect::ProtectedAttack::ProcessInput(), WsfQuantumAllocatorScript::WsfQuantumAllocatorScript(), WsfQuantumEvaluatorScript::WsfQuantumEvaluatorScript(), and WsfQuantumGeneratorScript::WsfQuantumGeneratorScript().
|
protected |
References mPlatformPartPtr, and mPlatformPtr.
Referenced by PostCompile(), and ValidateScript().
|
protected |
The real UtScriptContext that is associated with this object.
Referenced by CallScript(), Compile(), Compile(), DeclareVariable(), ExecuteScript(), ExecuteScript(), FindScript(), GetClass(), GetClass(), GetContext(), GetEnvironment(), GetScenario(), GetTypes(), Initialize(), Initialize(), InitializeGlobalContext(), operator=(), ProcessInput(), SetParent(), SetParent(), WsfScriptContext(), WsfScriptContext(), WsfScriptContext(), and WsfScriptContext().
|
protected |
The class name for a non-platform oriented object.
Referenced by Initialize(), operator=(), WsfScriptContext(), and WsfScriptContext().
|
protected |
A captured pointer to the on_update script (if it exists). It will also be in the 'mScripts' lists. (NOT for the global context).
Referenced by HasUpdateHandler(), Initialize(), operator=(), Update(), and WsfScriptContext().
|
protected |
Pointer to my immediate parent WsfScriptContext (nullptr if the global context).
Referenced by GetGlobalContext(), Initialize(), operator=(), and WsfScriptContext().
|
protected |
The platform part class name.
Referenced by Initialize(), operator=(), WsfScriptContext(), and WsfScriptContext().
|
protected |
The platform part variable name.
Referenced by Initialize(), operator=(), WsfScriptContext(), and WsfScriptContext().
|
protected |
If the context is for a platform part, this is its pointer.
Referenced by AddTimedEvents(), CallScript(), GetPart(), Initialize(), operator=(), WriteErrorHeader(), and WsfScriptContext().
|
protected |
If not the global context, this is the pointer to the associated platform.
Referenced by AddTimedEvents(), CallScript(), Initialize(), operator=(), Update(), WriteErrorHeader(), and WsfScriptContext().
|
protected |
'true' if call tracing is enabled.
Referenced by CallScript(), Initialize(), Initialize(), operator=(), ProcessInput(), and WsfScriptContext().
|
protected |
'true' if 'script_expect_error' is specified. Note that error checking is a 'one-shot' operation and is valid only for the next call to Compile. It is reset to false upon completion of the call.
Referenced by operator=(), PostCompile(), ProcessInput(), and WsfScriptContext().
|
protected |
The value of 'script_expect_error'.
Referenced by operator=(), PostCompile(), ProcessInput(), and WsfScriptContext().
|
protected |
'true' if script_print_code is enabled (prints the generated code after compiled)
Referenced by operator=(), PostCompile(), ProcessInput(), and WsfScriptContext().
|
protected |
Referenced by GetScenario(), GetSimTimeP(), GetSimulation(), Initialize(), Initialize(), InitializeGlobalContext(), operator=(), and WsfScriptContext().
|
protected |
Referenced by AddTimedEvents(), operator=(), ProcessInput(), and WsfScriptContext().
|
protected |
Referenced by InitializeGlobalContext(), operator=(), and WsfScriptContext().
|
protected |
'true' if the user defined a value for script_call_trace
Referenced by Initialize(), Initialize(), operator=(), ProcessInput(), and WsfScriptContext().