WSF
wsf::cyber::ApplicationExtension Class Reference

The WSF application extension for cyber. More...

#include <WsfCyberApplicationExtension.hpp>

Inheritance diagram for wsf::cyber::ApplicationExtension:
Collaboration diagram for wsf::cyber::ApplicationExtension:

Public Member Functions

 ~ApplicationExtension () override=default
void ScenarioCreated (WsfScenario &aScenario) override
void AddedToApplication (WsfApplication &aApplication) override
Public Member Functions inherited from WsfApplicationExtension
 WsfApplicationExtension ()
 Constructor.
 ~WsfApplicationExtension () override
WsfApplicationGetApplication () const
virtual int ProcessCommandLine (WsfStandardApplication::Options &aOptions, int aArgc, char *aArgv[])
virtual void PrintCommandLineArguments () const
virtual void PrintGrammar (std::ostream &aOut)
virtual void ProcessCommandLineCommands ()
virtual void SimulationCreated (WsfSimulation &aSimulation)
Public Member Functions inherited from WsfExtension
virtual ~WsfExtension ()=default
const std::string & GetExtensionName () const

Additional Inherited Members

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

Detailed Description

The WSF application extension for cyber.

Constructor & Destructor Documentation

◆ ~ApplicationExtension()

wsf::cyber::ApplicationExtension::~ApplicationExtension ( )
overridedefault

Member Function Documentation

◆ AddedToApplication()

void wsf::cyber::ApplicationExtension::AddedToApplication ( WsfApplication & aApplication)
overridevirtual

Called in response to WsfApplication::RegisterExtension. This is typically used to register script classes and methods, e.g.:

UtScriptTypes* scriptTypesPtr(aApplication.GetScriptTypes());
scriptTypesPtr->Register(MySensor::CreateScriptClass("MY_SENSOR", scriptTypesPtr));
Note
GetApplication() is now valid.

Reimplemented from WsfApplicationExtension.

References wsf::cyber::ScriptExtensions::ExtendScriptClasses(), WsfApplication::GetScriptTypes(), and WsfApplicationExtension::WsfApplication.

Referenced by ~ApplicationExtension().

◆ ScenarioCreated()

void wsf::cyber::ApplicationExtension::ScenarioCreated ( WsfScenario & aScenario)
overridevirtual

Called in response to the creation of a WsfScenario object. This is called at the end of the WsfScenario constructor. A derived class may provide this method to do the following:

  • Register a scenario extension to register new types and access the input stream to interpret commands, e.g.:
    aScenario.RegisterExtension("my_extension", new MyScenarioExtension);
  • If a scenario extension is not being created, register new type objects or object factories, e.g.:
    aScenario.GetMoverTypes().AddCoreType("MY_MOVER", new MyMover(aScenario));
    aScenario.GetAntennaPatternTypes().AddObjectFactor(MyAntennaPattern::ObjectFactory);
Parameters
aScenarioThe scenario object that is being created.
See also
WsfScenarioExtension.

Reimplemented from WsfApplicationExtension.

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

Referenced by ~ApplicationExtension().


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