WSF
WsfExtInput Class Reference

#include <WsfExtInterface.hpp>

Inheritance diagram for WsfExtInput:
Collaboration diagram for WsfExtInput:

Public Member Functions

 WsfExtInput (WsfScenario &aScenario)
 ~WsfExtInput () override
void SimulationCreated (WsfSimulation &aSimulation) override
bool Complete () override
virtual bool ProcessExtInput (UtInput &aInput)
WsfExtEmissionGetEmission ()
void AddedToScenario () override
Public Member Functions inherited from WsfScenarioExtension
 WsfScenarioExtension ()
 ~WsfScenarioExtension () override
WsfScenarioGetScenario () const
WsfApplicationGetApplication () const
virtual bool ProcessInput (UtInput &aInput)
virtual void FileLoaded (const std::string &aFileName)
virtual bool Complete2 ()
virtual bool AlwaysCreate ()
Public Member Functions inherited from WsfExtension
virtual ~WsfExtension ()=default
const std::string & GetExtensionName () const

Static Public Member Functions

static WsfExtInputFind (const WsfScenario &aScenario)

Public Attributes

WsfExtData mData

Additional Inherited Members

Protected Member Functions inherited from WsfExtension
void InitializeExtensionName (const std::string &aName)

Constructor & Destructor Documentation

◆ WsfExtInput()

WsfExtInput::WsfExtInput ( WsfScenario & aScenario)

References mData, and WsfScenarioExtension::WsfScenario.

Referenced by Find().

◆ ~WsfExtInput()

WsfExtInput::~WsfExtInput ( )
override

Member Function Documentation

◆ AddedToScenario()

void WsfExtInput::AddedToScenario ( )
overridevirtual

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.:

WsfScenario& scenario(GetScenario());
WsfMoverTypes::Get(scenario).AddCoreType("MY_MOVER", new MyMover(scenario));
WsfAntennaPatterTypes::Get(scenario).AddObjectFactor(MyAntennaPattern::ObjectFactory);
static WSF_EXPORT WsfMoverTypes & Get(WsfScenario &aScenario)
Return a modifiable reference to the type list associated with the specified scenario.
Definition WsfMoverTypes.cpp:53
bool AddCoreType(WsfStringId aId, std::unique_ptr< T > aDefinitionPtr)
Definition WsfObjectTypeList.hpp:102
WsfScenario & GetScenario() const
Definition WsfScenarioExtension.hpp:46
friend class WsfScenario
Definition WsfScenarioExtension.hpp:39

Script classes must NOT be registered here because they are global to the entire application. They should be registered in WsfApplication::AddedToApplication.

Note
GetScenario() and GetApplication() are now valid.

Reimplemented from WsfScenarioExtension.

◆ Complete()

bool WsfExtInput::Complete ( )
overridevirtual

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.:

app.ExtensionDepends("my_ext", "other_ext");
Returns
'true' if no problems or 'false' if an error occurred that would prevent execution.

Reimplemented from WsfScenarioExtension.

References WsfScenarioExtension::GetScenario(), and mData.

◆ Find()

◆ GetEmission()

WsfExtEmission * WsfExtInput::GetEmission ( )
inline

References mData.

Referenced by WsfMilExtInterface::PrintEmitterTypes().

◆ ProcessExtInput()

virtual bool WsfExtInput::ProcessExtInput ( UtInput & aInput)
inlinevirtual

Process input from client input blocks (DIS, HLA).

Note
This method name is intentionally different from ProcessInput. We do not want the scenario to process input for the Ext interface, as it could be at the global level.

References WsfScenarioExtension::GetScenario(), and mData.

Referenced by WsfDisInput::ProcessDeviceInput().

◆ SimulationCreated()

void WsfExtInput::SimulationCreated ( WsfSimulation & aSimulation)
overridevirtual

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.RegisterExtension("my_ext", new MySimulationExtension());
Parameters
aSimulationThe simulation that is being created. See note below!
Note
This is called upon entry to WsfSimulation::Initialize() and nothing can be assumed about the state of the simulation.
See also
WsfSimulationExtension, WsfApplicationExtension::SimulationCreated

Reimplemented from WsfScenarioExtension.

References WsfExtension::GetExtensionName(), and WsfSimulation::RegisterExtension().

Member Data Documentation

◆ mData


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved