WSF
WsfSOSM_Interface Class Reference

#include <WsfSOSM_Interface.hpp>

Inheritance diagram for WsfSOSM_Interface:
Collaboration diagram for WsfSOSM_Interface:

Public Member Functions

 WsfSOSM_Interface ()
 ~WsfSOSM_Interface () override
void AddedToScenario () override
bool Complete () override
bool ProcessInput (UtInput &aInput) override
std::string GetSensorType (WsfSensorMode *aSensorModePtr) const
 Return the SOSM sensor type to be used to model the specified sensor (mode).
std::string GetTargetType (WsfPlatform *aTargetPtr) const
 Return the SOSM target type to be used to model the specified target.
SOSM_ManagerGetManager () const
Public Member Functions inherited from WsfScenarioExtension
 WsfScenarioExtension ()
 ~WsfScenarioExtension () override
WsfScenarioGetScenario () const
WsfApplicationGetApplication () const
virtual void FileLoaded (const std::string &aFileName)
virtual bool Complete2 ()
virtual void SimulationCreated (WsfSimulation &aSimulation)
virtual bool AlwaysCreate ()
Public Member Functions inherited from WsfExtension
virtual ~WsfExtension ()=default
const std::string & GetExtensionName () const

Protected Types

typedef std::map< std::string, std::string > TypeMap

Protected Member Functions

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

Protected Attributes

SOSM_ManagermManagerPtr
TypeMap mSensorTypeMap
TypeMap mTargetTypeMap
UtCallbackHolder mCallbacks

Detailed Description

A scenario extension that provides an interface to the Spectral Optical Sensor Model (SOSM).

This class implements the processing for the 'sosm_interface' input block, which is provided by the user to local SOSM input files.

Member Typedef Documentation

◆ TypeMap

typedef std::map<std::string, std::string> WsfSOSM_Interface::TypeMap
protected

Constructor & Destructor Documentation

◆ WsfSOSM_Interface()

WsfSOSM_Interface::WsfSOSM_Interface ( )

◆ ~WsfSOSM_Interface()

WsfSOSM_Interface::~WsfSOSM_Interface ( )
override

References mManagerPtr.

Member Function Documentation

◆ AddedToScenario()

void WsfSOSM_Interface::AddedToScenario ( )
overridevirtual

Called when the extension has been added to the scenario. This is typically used to register new component type objects and object factories, e.g.:

WsfScenario& scenario(GetScenario());
WsfMoverTypes::Get(scenario).AddCoreType("MY_MOVER", new MyMover(scenario));
WsfAntennaPatterTypes::Get(scenario).AddObjectFactor(MyAntennaPattern::ObjectFactory);
static WSF_EXPORT WsfMoverTypes & Get(WsfScenario &aScenario)
Return a modifiable reference to the type list associated with the specified scenario.
Definition WsfMoverTypes.cpp:53
bool AddCoreType(WsfStringId aId, std::unique_ptr< T > aDefinitionPtr)
Definition WsfObjectTypeList.hpp:102
WsfScenario & GetScenario() const
Definition WsfScenarioExtension.hpp:46
friend class WsfScenario
Definition WsfScenarioExtension.hpp:39

Script classes must NOT be registered here because they are global to the entire application. They should be registered in WsfApplication::AddedToApplication.

Note
GetScenario() and GetApplication() are now valid.

Reimplemented from WsfScenarioExtension.

References WsfObjectTypeList< T >::AddCoreType(), FileReferenced(), WsfSensorTypes::Get(), WsfScenarioExtension::GetScenario(), mCallbacks, and mManagerPtr.

◆ Complete()

bool WsfSOSM_Interface::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 mManagerPtr, mSensorTypeMap, mTargetTypeMap, and ok.

◆ FileReferenced()

void WsfSOSM_Interface::FileReferenced ( const std::string & aFileName)
protected

◆ GetManager()

SOSM_Manager & WsfSOSM_Interface::GetManager ( ) const
inline

◆ GetSensorType()

std::string WsfSOSM_Interface::GetSensorType ( WsfSensorMode * aSensorModePtr) const

Return the SOSM sensor type to be used to model the specified sensor (mode).

References WsfNamed::GetName(), WsfSensorMode::GetSensor(), WsfObject::GetType(), WsfObject::GetTypeList(), mManagerPtr, and mSensorTypeMap.

Referenced by WsfSOSM_Sensor::SOSM_Mode::Initialize().

◆ GetTargetType()

std::string WsfSOSM_Interface::GetTargetType ( WsfPlatform * aTargetPtr) const

Return the SOSM target type to be used to model the specified target.

References WsfObject::GetType(), WsfObject::GetTypeList(), mManagerPtr, and mTargetTypeMap.

Referenced by WsfSOSM_Sensor::SOSM_Mode::AttemptToDetect().

◆ ProcessInput()

bool WsfSOSM_Interface::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 WsfScenarioExtension::GetScenario(), WsfScenario::GetSystemLog(), mManagerPtr, mSensorTypeMap, mTargetTypeMap, and WsfSystemLog::WriteLogEntry().

Member Data Documentation

◆ mCallbacks

UtCallbackHolder WsfSOSM_Interface::mCallbacks
protected

◆ mManagerPtr

◆ mSensorTypeMap

TypeMap WsfSOSM_Interface::mSensorTypeMap
protected

◆ mTargetTypeMap

TypeMap WsfSOSM_Interface::mTargetTypeMap
protected

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