WSF
Fires::FiresTables Class Reference

#include <FiresTables.hpp>

Inheritance diagram for Fires::FiresTables:
Collaboration diagram for Fires::FiresTables:

Public Member Functions

 FiresTables ()
 ~FiresTables () override
void AddedToScenario () override
bool ProcessInput (UtInput &aInput) override
virtual void AddType (const std::string &aTypeName)
virtual bool IsType (const std::string &aType)
 Return whether the given type matches one of the types provided in a "ballistic_types" input block.
std::map< WsfStringId, WsfStringId > & AeroMap ()
std::map< WsfStringId, double > & MassMap ()
std::map< WsfStringId, FiresTable * > & FireTables ()
FiresTableGetTable (const std::string &aType) const
bool UseFiresMoverExtrapolation ()
bool UsesMaxOrd (const std::string &aType)
bool GetMaxOrdAndTOF (const std::string &aType, double aRange, double &aMaxOrd, double &aTOF)
bool GetElevationAngleAndTOF (const std::string &aType, double aRange, double &aElevationAngle, double &aTOF)
Public Member Functions inherited from WsfScenarioExtension
 WsfScenarioExtension ()
 ~WsfScenarioExtension () override
WsfScenarioGetScenario () const
WsfApplicationGetApplication () const
virtual void FileLoaded (const std::string &aFileName)
virtual bool Complete ()
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

Static Public Member Functions

static FiresTablesFind (const WsfScenario &aScenario)

Protected Attributes

bool mUseFiresMoverExtrapolation
bool mTestEnabled
std::map< WsfStringId, WsfStringIdmAeroMap
std::map< WsfStringId, double > mMassMap
std::map< WsfStringId, FiresTable * > mTables
std::set< WsfStringIdmTypes

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ FiresTables()

Fires::FiresTables::FiresTables ( )

References mTestEnabled, and mUseFiresMoverExtrapolation.

Referenced by Find().

◆ ~FiresTables()

Fires::FiresTables::~FiresTables ( )
override

References mTables.

Member Function Documentation

◆ AddedToScenario()

void Fires::FiresTables::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 >::Add(), WsfLaunchComputerTypes::Get(), WsfMoverTypes::Get(), WsfScenarioExtension::GetScenario(), and WsfScenarioExtension::WsfScenario.

◆ AddType()

void Fires::FiresTables::AddType ( const std::string & aTypeName)
virtual

References mTypes.

Referenced by ProcessInput().

◆ AeroMap()

std::map< WsfStringId, WsfStringId > & Fires::FiresTables::AeroMap ( )
inline

References mAeroMap.

◆ Find()

◆ FireTables()

std::map< WsfStringId, FiresTable * > & Fires::FiresTables::FireTables ( )
inline

◆ GetElevationAngleAndTOF()

bool Fires::FiresTables::GetElevationAngleAndTOF ( const std::string & aType,
double aRange,
double & aElevationAngle,
double & aTOF )

◆ GetMaxOrdAndTOF()

bool Fires::FiresTables::GetMaxOrdAndTOF ( const std::string & aType,
double aRange,
double & aMaxOrd,
double & aTOF )

Return the "max. ord.," or maximum height of the trajectory, and time of flight, for a given weapon type and horizontal range to target.

Parameters
aTypeThe weapon type. This must correspond with a SystemMunition name in one of the fires tables.
aRangeThe desired horizontal range of the flyout.
aMaxOrd(output) The max. ord. (max. height) for the trajectory.
aTOF(output) The time of flight of the round.
Returns
Whether an acceptable solution was computed.

References Fires::FiresTable::GetMaxOrdAndTOF(), Fires::FiresTable::GetMinimumRange(), mTables, and ok.

◆ GetTable()

FiresTable * Fires::FiresTables::GetTable ( const std::string & aType) const

References mTables.

◆ IsType()

bool Fires::FiresTables::IsType ( const std::string & aType)
virtual

Return whether the given type matches one of the types provided in a "ballistic_types" input block.

References mTypes.

Referenced by Fires::Observer::WeaponFired().

◆ MassMap()

std::map< WsfStringId, double > & Fires::FiresTables::MassMap ( )
inline

References mMassMap.

◆ ProcessInput()

bool Fires::FiresTables::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 AddType(), Fires::FiresTable::GetName(), mAeroMap, mMassMap, mTables, mTestEnabled, mUseFiresMoverExtrapolation, and Fires::FiresTableLoader::ProcessTable().

◆ UseFiresMoverExtrapolation()

bool Fires::FiresTables::UseFiresMoverExtrapolation ( )
inline

◆ UsesMaxOrd()

bool Fires::FiresTables::UsesMaxOrd ( const std::string & aType)

References mTables.

Member Data Documentation

◆ mAeroMap

std::map<WsfStringId, WsfStringId> Fires::FiresTables::mAeroMap
protected

Referenced by AeroMap(), and ProcessInput().

◆ mMassMap

std::map<WsfStringId, double> Fires::FiresTables::mMassMap
protected

Referenced by MassMap(), and ProcessInput().

◆ mTables

std::map<WsfStringId, FiresTable*> Fires::FiresTables::mTables
protected

◆ mTestEnabled

bool Fires::FiresTables::mTestEnabled
protected

Referenced by FiresTables(), and ProcessInput().

◆ mTypes

std::set<WsfStringId> Fires::FiresTables::mTypes
protected

Referenced by AddType(), and IsType().

◆ mUseFiresMoverExtrapolation

bool Fires::FiresTables::mUseFiresMoverExtrapolation
protected

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