WSF
engage::InputConfig Class Reference

#include <InputConfig.hpp>

Inheritance diagram for engage::InputConfig:
Collaboration diagram for engage::InputConfig:

Public Member Functions

 InputConfig ()
 ~InputConfig () 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

Static Public Member Functions

static InputConfigFindExtension (WsfScenario &aScenario)
 Given a scenario, find the input data extension.

Implementation of WsfScenarioExtension base class methods.

typedef std::list< RunConfigRunList
bool ProcessInput (UtInput &aInput) override
bool Complete () override
void SimulationCreated (WsfSimulation &aSimulation) override
const OutputRateGetOutputRate (const std::string &aTableName) const
int GetThreadCount () const
int GetTaskCount () const
Task MakeTask (int aTaskIndex) const
 Create a 'Task' object for the specified task index.
const RunListGetRunList () const
 Return a reference to the list of runs to be performed.

Additional Inherited Members

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

Member Typedef Documentation

◆ RunList

Constructor & Destructor Documentation

◆ InputConfig()

engage::InputConfig::InputConfig ( )

References engage::OutputRate::Append().

Referenced by FindExtension().

◆ ~InputConfig()

engage::InputConfig::~InputConfig ( )
override

Member Function Documentation

◆ Complete()

bool engage::InputConfig::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 engage::RunConfig::Complete(), engage::RunConfig::GetTaskCount(), and ok.

◆ FindExtension()

InputConfig & engage::InputConfig::FindExtension ( WsfScenario & aScenario)
static

Given a scenario, find the input data extension.

References WsfScenario::FindExtension(), InputConfig(), WsfScenarioExtension::WsfScenario, and WsfScenarioExtension::WsfScenarioExtension().

Referenced by main().

◆ GetOutputRate()

const OutputRate * engage::InputConfig::GetOutputRate ( const std::string & aTableName) const

◆ GetRunList()

const RunList & engage::InputConfig::GetRunList ( ) const
inline

Return a reference to the list of runs to be performed.

Referenced by engage::TaskOutput::ResetSummary().

◆ GetTaskCount()

int engage::InputConfig::GetTaskCount ( ) const
inline

◆ GetThreadCount()

int engage::InputConfig::GetThreadCount ( ) const
inline

◆ MakeTask()

Task engage::InputConfig::MakeTask ( int aTaskIndex) const

Create a 'Task' object for the specified task index.

References engage::RunConfig::GetTaskCount(), and engage::RunConfig::MakeTask().

◆ ProcessInput()

bool engage::InputConfig::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.

References engage::OutputRate::ProcessInputBlock().

◆ SimulationCreated()

void engage::InputConfig::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::RegisterExtension().


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