WSF
WsfLegacyScenarioExtension< CLASS > Class Template Reference

#include <WsfScenarioExtension.hpp>

Inheritance diagram for WsfLegacyScenarioExtension< CLASS >:
Collaboration diagram for WsfLegacyScenarioExtension< CLASS >:

Public Member Functions

 WsfLegacyScenarioExtension (CLASS *aClassPtr)
 ~WsfLegacyScenarioExtension () override
bool ProcessInput (UtInput &aInput) override
void SimulationCreated (WsfSimulation &aSimulation) override
 'Creates' the legacy extension only once
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

Protected Attributes

std::recursive_mutex mMutex
CLASS * mClassPtr

Additional Inherited Members

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

Detailed Description

template<typename CLASS>
class WsfLegacyScenarioExtension< CLASS >

Implements WsfScenarioExtension for legacy code that does not support multiple simulations WsfLegacyScenarioExtension will provide capability to run a single simulation with the given extension. Subsequent simulations will not have access to this extension CLASS should be castable to WsfSimulationExtension.

Constructor & Destructor Documentation

◆ WsfLegacyScenarioExtension()

template<typename CLASS>
WsfLegacyScenarioExtension< CLASS >::WsfLegacyScenarioExtension ( CLASS * aClassPtr)
inline

References mClassPtr.

◆ ~WsfLegacyScenarioExtension()

template<typename CLASS>
WsfLegacyScenarioExtension< CLASS >::~WsfLegacyScenarioExtension ( )
inlineoverride

References mClassPtr.

Member Function Documentation

◆ ProcessInput()

template<typename CLASS>
bool WsfLegacyScenarioExtension< CLASS >::ProcessInput ( UtInput & aInput)
inlineoverridevirtual

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

◆ SimulationCreated()

template<typename CLASS>
void WsfLegacyScenarioExtension< CLASS >::SimulationCreated ( WsfSimulation & aSimulation)
inlineoverridevirtual

'Creates' the legacy extension only once

Reimplemented from WsfScenarioExtension.

References WsfExtension::GetExtensionName(), mClassPtr, mMutex, and WsfPrivate::RegisterSimulationExtension().

Member Data Documentation

◆ mClassPtr

template<typename CLASS>
CLASS* WsfLegacyScenarioExtension< CLASS >::mClassPtr
protected

◆ mMutex

template<typename CLASS>
std::recursive_mutex WsfLegacyScenarioExtension< CLASS >::mMutex
protected

Referenced by SimulationCreated().


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