WSF
WsfEventPipeExtension Class Reference

Scenario extension for event pipe. Reads the input file. More...

#include <WsfEventPipe.hpp>

Inheritance diagram for WsfEventPipeExtension:
Collaboration diagram for WsfEventPipeExtension:

Public Types

using DetailSettingsMap = std::map<std::string, WsfEventPipeOptions>
 This is used ONLY by WsfGrammarInterface::OutputForIDE to get events names and such for the IDE.

Public Member Functions

 WsfEventPipeExtension ()
 ~WsfEventPipeExtension () override=default
bool ProcessInput (UtInput &aInput) override
void SimulationCreated (WsfSimulation &aSimulation) override
int RegisterEventOption (const std::string &aOptionName, bool aDefaultValue)
void AddSchema (const std::string &aSchemaText)
 Additional UtPack structures may be defined by other extensions.
void AddCallback (std::unique_ptr< UtCallback > aCallbackPtr)
const UtTextDocument & GetSchema () const
std::vector< std::string > & GetEventNames ()
const std::vector< std::string > & GetEventNames () const
const wsf::eventpipe::EventIdsGetEventIds () const
const DetailSettingsMapGetDetailSettings () const
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 Complete ()
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 WsfEventPipeExtensionFind (const WsfScenario &aScenario)

Public Attributes

UtCallbackListN< void(UtPackSerializer *)> RegisterExtensionMessages

aName The event name whose identifier is desired.

Return the unique integer identifier for the specified event name.

Returns
The identifier.
int GetEventId (const std::string &aName) const

Additional Inherited Members

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

Detailed Description

Scenario extension for event pipe. Reads the input file.

Member Typedef Documentation

◆ DetailSettingsMap

This is used ONLY by WsfGrammarInterface::OutputForIDE to get events names and such for the IDE.

Constructor & Destructor Documentation

◆ WsfEventPipeExtension()

WsfEventPipeExtension::WsfEventPipeExtension ( )

◆ ~WsfEventPipeExtension()

WsfEventPipeExtension::~WsfEventPipeExtension ( )
overridedefault

Member Function Documentation

◆ AddCallback()

void WsfEventPipeExtension::AddCallback ( std::unique_ptr< UtCallback > aCallbackPtr)

◆ AddSchema()

◆ Find()

◆ GetDetailSettings()

const DetailSettingsMap & WsfEventPipeExtension::GetDetailSettings ( ) const
inline

◆ GetEventId()

int WsfEventPipeExtension::GetEventId ( const std::string & aName) const

References GetEventNames().

◆ GetEventIds()

const wsf::eventpipe::EventIds & WsfEventPipeExtension::GetEventIds ( ) const
inline

◆ GetEventNames() [1/2]

std::vector< std::string > & WsfEventPipeExtension::GetEventNames ( )
inline

Referenced by GetEventId().

◆ GetEventNames() [2/2]

const std::vector< std::string > & WsfEventPipeExtension::GetEventNames ( ) const
inline

◆ GetSchema()

const UtTextDocument & WsfEventPipeExtension::GetSchema ( ) const
inline

◆ ProcessInput()

bool WsfEventPipeExtension::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 WsfEventPipeOptionsCriteria::cCATEGORY_NAME, WsfEventPipeOptionsCriteria::cPLATFORM_NAME, WsfEventPipeOptionsCriteria::cPLATFORM_TYPE, WsfEventPipeOptionsCriteria::cSIDE_NAME, WsfEventPipeInput::CriteriaToDetail::mCriteria, WsfEventPipeInput::CriteriaToDetail::mDetailSettingName, WsfEventPipeOptionsCriteria::mKind, and WsfEventPipeOptionsCriteria::mText.

◆ RegisterEventOption()

int WsfEventPipeExtension::RegisterEventOption ( const std::string & aOptionName,
bool aDefaultValue )

Add a new event that can be selected to be included in the output stream. Other extensions can define events that can be included in the output stream.

Extensions that want to include additional events should call this option in their scenario extension constructor and should also call AddSchema.

Parameters
aOptionNameThe name by which the event is to be known.
aDefaultValueThe default value for the "default" and "low" sets.
Returns
The unique index of the event.

Referenced by wsf::AirCombat::EventPipe::RegisterEvents(), wsf::annotation::EventPipe::RegisterEvents(), wsf::cyber::EventPipe::RegisterEvents(), wsf::p6dof::EventPipe::RegisterEvents(), wsf::six_dof::EventPipe::RegisterEvents(), wsf::space::EventPipe::RegisterEvents(), wsf::xio::EventPipe::RegisterEvents(), WsfMilEventPipe::RegisterEvents(), and ~WsfEventPipeExtension().

◆ SimulationCreated()

void WsfEventPipeExtension::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

◆ RegisterExtensionMessages


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