WSF
wsf::console::ScenarioExtension Class Referencefinal

Reads the input for console_output. More...

#include <WsfConsole.hpp>

Inheritance diagram for wsf::console::ScenarioExtension:
Collaboration diagram for wsf::console::ScenarioExtension:

Public Member Functions

 ScenarioExtension ()=default
 ScenarioExtension (const ScenarioExtension &)=delete
ScenarioExtensionoperator= (const ScenarioExtension &)=delete
bool ProcessInput (UtInput &aInput) override
void SimulationCreated (WsfSimulation &aSimulation) override
bool Complete () override
Public Member Functions inherited from WsfScenarioExtension
 WsfScenarioExtension ()
 ~WsfScenarioExtension () override
WsfScenarioGetScenario () const
WsfApplicationGetApplication () const
virtual void AddedToScenario ()
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

Additional Inherited Members

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

Detailed Description

Reads the input for console_output.

Constructor & Destructor Documentation

◆ ScenarioExtension() [1/2]

wsf::console::ScenarioExtension::ScenarioExtension ( )
default

Referenced by operator=(), and ScenarioExtension().

◆ ScenarioExtension() [2/2]

wsf::console::ScenarioExtension::ScenarioExtension ( const ScenarioExtension & )
delete

References ScenarioExtension().

Member Function Documentation

◆ Complete()

bool wsf::console::ScenarioExtension::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.

Referenced by operator=().

◆ operator=()

ScenarioExtension & wsf::console::ScenarioExtension::operator= ( const ScenarioExtension & )
delete

◆ ProcessInput()

bool wsf::console::ScenarioExtension::ProcessInput ( UtInput & aInput)
overridevirtual

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

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the extension or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.

Reimplemented from WsfScenarioExtension.

Referenced by operator=().

◆ SimulationCreated()

void wsf::console::ScenarioExtension::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 WsfSimulation::SubstituteOutputFileVariables().

Referenced by operator=().


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