|
WSF
|
#include <WsfScenarioExtension.hpp>


Public Member Functions | |
| WsfScenarioExtension () | |
| ~WsfScenarioExtension () override | |
| WsfScenario & | GetScenario () const |
| WsfApplication & | GetApplication () const |
| Public Member Functions inherited from WsfExtension | |
| virtual | ~WsfExtension ()=default |
| const std::string & | GetExtensionName () const |
Friends | |
| class | WsfScenario |
Notifications from the scenario. | |
These are called in the order they are listed. | |
| virtual void | AddedToScenario () |
| virtual bool | ProcessInput (UtInput &aInput) |
| virtual void | FileLoaded (const std::string &aFileName) |
| virtual bool | Complete () |
| virtual bool | Complete2 () |
| virtual void | SimulationCreated (WsfSimulation &aSimulation) |
| virtual bool | AlwaysCreate () |
Additional Inherited Members | |
| Protected Member Functions inherited from WsfExtension | |
| void | InitializeExtensionName (const std::string &aName) |
A base class for 'scenario extensions'.
A scenario extension is a object created and registered with an scenario object. A scenario object will allow scenario extensions to examine the input stream and process commands as necessary.
An application extension may instantiate and register a derived version of this class, typically from within the derived class method WsfApplicationExtension::ScenarioCreated.
| WsfScenarioExtension::WsfScenarioExtension | ( | ) |
Referenced by engage::InputConfig::FindExtension(), wsf::cyber::ScenarioExtension::Get(), wsf::EarthGravityModelExtension::Get(), wsf::OMS_UCI_Extension::Get(), wsf::simdis::ScenarioExtension::ScenarioExtension(), WsfAirCombatTypeManager::WsfAirCombatTypeManager(), WsfP6DOF_TypeManager::WsfP6DOF_TypeManager(), and WsfScenario.
|
override |
|
virtual |
Called when the extension has been added to the scenario. This is typically used to register new component type objects and object factories, e.g.:
Script classes must NOT be registered here because they are global to the entire application. They should be registered in WsfApplication::AddedToApplication.
Reimplemented in Fires::FiresTables, IADSC2ScenarioExtension, ToolManager, wsf::coverage::ScenarioExtension, wsf::cyber::ScenarioExtension, wsf::OMS_UCI_Extension, wsf::six_dof::Environment, wsf::six_dof::TypeManager, wsf::space::AtmosphereScenarioExtension, WsfAirCombatTypeManager, WsfAnnotationExtension, WsfBrawler, WsfExtInput, WsfMilExtension, WsfMultiresolutionTypesRegistration, WsfP6DOF_TypeManager, WsfSensorPlotExtension, WsfSOSM_Interface, and WsfSpaceExtension.
|
virtual |
Declare if the extension is required or optional. An extension may be declared optional if this method returns 'false'. An optional extension is one that is not loaded unless required by some other extension.
|
virtual |
Called when all inputs are processed. This is called when the application calls WsfScenario::LoadComplete to signify that all input data has been loaded into the scenario. The extension should perform any additional validity checking or other processing on its input data. Constant data may be created and stored here. Unless Complete2() is also implement, the contents of this class should not be changed after this call.
The extension should not assume anything about the state of another extension unless this a dependency has been registered to ensure the other extension has been called prior to this, e.g.:
Reimplemented in engage::InputConfig, wsf::console::ScenarioExtension, wsf::EarthGravityModelExtension, WsfConfigureAccessReport, WsfExtInput, and WsfSOSM_Interface.
Referenced by WsfScenario::CompleteLoad().
|
virtual |
Phase 2 Complete. This is called after all extensions have their Complete() methods called. The contents of this class should remain constant after this call.
Reimplemented in WsfSensorPlotExtension.
Referenced by WsfScenario::CompleteLoad().
|
virtual |
Called after a file has been loaded into the scenario.
| aFileName | The name of the file thast has been loaded into the scenario. |
Reimplemented in WsfGrammarCheckExtension.
Referenced by WsfScenario::LoadFromFile().
| WsfApplication & WsfScenarioExtension::GetApplication | ( | ) | const |
Returns the application which owns the scenario
Referenced by WsfGrammarCheckExtension::FileLoaded().
|
inline |
Returns the scenario to which this extension is attached.
References WsfScenario.
Referenced by Fires::FiresTables::AddedToScenario(), IADSC2ScenarioExtension::AddedToScenario(), wsf::coverage::ScenarioExtension::AddedToScenario(), wsf::cyber::ScenarioExtension::AddedToScenario(), wsf::OMS_UCI_Extension::AddedToScenario(), wsf::six_dof::Environment::AddedToScenario(), wsf::six_dof::TypeManager::AddedToScenario(), wsf::space::AtmosphereScenarioExtension::AddedToScenario(), WsfAirCombatTypeManager::AddedToScenario(), WsfAnnotationExtension::AddedToScenario(), WsfBrawler::AddedToScenario(), WsfMilExtension::AddedToScenario(), WsfP6DOF_TypeManager::AddedToScenario(), WsfSOSM_Interface::AddedToScenario(), WsfSpaceExtension::AddedToScenario(), WsfConfigureAccessReport::Complete(), WsfExtInput::Complete(), WsfGrammarCheckExtension::FileLoaded(), WsfSOSM_Interface::FileReferenced(), WsfMultiresolutionTypesRegistration::GetMultiresolutionTypes(), WsfExtInput::ProcessExtInput(), wsf::dis::ScenarioExtension::ProcessInput(), wsf::six_dof::TypeManager::ProcessInput(), WsfSensorPlotExtension::ProcessInput(), WsfSOSM_Interface::ProcessInput(), and wsf::six_dof::TypeManager::VehicleFactory().
|
virtual |
Process potential input for the extension. This method examines the current input command to determine if it is one that is recognized by the extension. If it is one recognized by the extension then it processes the command and returns 'true', otherwise it returns 'false'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented in engage::InputConfig, Fires::FiresTables, StubInterface, ToolManager, wsf::console::ScenarioExtension, wsf::cyber::ScenarioExtension, wsf::dis::ScenarioExtension, wsf::EarthGravityModelExtension, wsf::event::output::ScenarioExtension< DATA, SIM_EXTENSION >, wsf::OMS_UCI_Extension, wsf::simdis::ScenarioExtension, wsf::six_dof::Environment, wsf::six_dof::TypeManager, WsfAnnotationExtension, WsfCloneableScenarioExtension, WsfConfigureAccessReport, WsfConfigureEclipseReport, WsfEventPipeExtension, WsfL16_Extension, WsfLegacyScenarioExtension< CLASS >, WsfLOS_ManagerExtension, WsfMilExtension, WsfMultiresolutionMultirunTable, WsfP6DOF_TypeManager, WsfRIPR_ModuleSetup, WsfScriptObserverExtension, WsfSensorPlotExtension, WsfSOSM_Interface, and WsfWeaponServerExtension.
Referenced by WsfScenario::ProcessExtensionInput(), and wsf::OMS_UCI_Extension::ProcessInput().
|
virtual |
Called when a simulation has been created. (Technically this is called upon entry to WsfSimulation::Initialize()). This is typically used when a scenario extension also requires a simulation extension. The method would typically register the simulation extension as follows:
| aSimulation | The simulation that is being created. See note below! |
Reimplemented in engage::InputConfig, IADSC2ScenarioExtension, wsf::comm::NetworkManagerExtension, wsf::console::ScenarioExtension, wsf::cyber::ScenarioExtension, wsf::dis::ScenarioExtension, wsf::EarthGravityModelExtension, wsf::event::output::ScenarioExtension< DATA, SIM_EXTENSION >, wsf::OMS_UCI_Extension, wsf::simdis::ScenarioExtension, wsf::six_dof::TypeManager, WsfAirCombatTypeManager, WsfAnnotationExtension, WsfCloneableScenarioExtension, WsfConfigureAccessReport, WsfConfigureEclipseEventManger, WsfConfigureEclipseReport, WsfDefaultScenarioExtension< SIMULATION_EXTENSION >, WsfEventPipeExtension, WsfExtInput, WsfL16_Extension, WsfLegacyScenarioExtension< CLASS >, WsfLOS_ManagerExtension, WsfMultiresolutionMultirunTable, WsfP6DOF_TypeManager, WsfRIPR_ModuleSetup, WsfScriptObserverExtension, WsfSpaceExtension, and WsfWeaponServerExtension.
Referenced by WsfScenario::SimulationCreated().
|
friend |
References WsfScenario, and WsfScenarioExtension().
Referenced by Fires::FiresTables::AddedToScenario(), IADSC2ScenarioExtension::AddedToScenario(), wsf::coverage::ScenarioExtension::AddedToScenario(), wsf::six_dof::Environment::AddedToScenario(), wsf::six_dof::TypeManager::AddedToScenario(), wsf::space::AtmosphereScenarioExtension::AddedToScenario(), WsfAirCombatTypeManager::AddedToScenario(), WsfBrawler::AddedToScenario(), WsfMilExtension::AddedToScenario(), WsfP6DOF_TypeManager::AddedToScenario(), WsfSpaceExtension::AddedToScenario(), Fires::FiresTables::Find(), ToolManager::Find(), wsf::dis::ScenarioExtension::Find(), wsf::simdis::ScenarioExtension::Find(), WsfEventPipeExtension::Find(), WsfExtInput::Find(), WsfL16_Extension::Find(), WsfMilExtension::Find(), WsfMultiresolutionMultirunTable::Find(), WsfSensorPlotExtension::Find(), engage::InputConfig::FindExtension(), wsf::cyber::ScenarioExtension::Get(), wsf::EarthGravityModelExtension::Get(), wsf::OMS_UCI_Extension::Get(), WsfMilExtension::Get(), WsfSpaceExtension::Get(), IADSC2ScenarioExtension::GetGlobalLogger(), GetScenario(), WsfSensorPlotExtension::RegisterFunction(), StubInterface::StubInterface(), ToolManager::ToolManager(), WsfExtInput::WsfExtInput(), WsfL16_Extension::WsfL16_Extension(), WsfMultiresolutionMultirunTable::WsfMultiresolutionMultirunTable(), WsfRIPR_ModuleSetup::WsfRIPR_ModuleSetup(), WsfScenario, and wsf::EarthGravityModelExtension::~EarthGravityModelExtension().