WSF
wsf::coverage::ZoneBasedGrid Class Reference

This is a regular grid in latitude and longitude bounded by a WsfZone. More...

#include <WsfCoverageZoneBasedGrid.hpp>

Inheritance diagram for wsf::coverage::ZoneBasedGrid:
Collaboration diagram for wsf::coverage::ZoneBasedGrid:

Public Member Functions

 ZoneBasedGrid (const WsfScenario &aScenario)
 ZoneBasedGrid (const ZoneBasedGrid &aOther)=default
 ~ZoneBasedGrid () override=default
ZoneBasedGridClone () const override
bool ProcessInput (UtInput &aInput) override
void PreparePlatforms (WsfSimulation &aSimulation) override
void InvokeOnComponent (GridAction &aAction, std::size_t aComponentIndex) const override
 Invoke the given aAction on the points of the specified grid component.
const std::string & GetZoneName () const
 Return the name of the that defines the boundary of this grid.
Public Member Functions inherited from wsf::coverage::LatLonGrid
 LatLonGrid (const WsfScenario &aScenario)
 LatLonGrid (const LatLonGrid &aOther)=default
 ~LatLonGrid () override=default
double GetMinimumLatitudeDeg () const
 Return the minimum latitude in the grid in degrees.
double GetMaximumLatitudeDeg () const
 Return the maximum latitude in the grid in degrees.
double GetMinimumLongitudeDeg () const
 Return the minimum longitude in the grid in degrees.
double GetMaximumLongitudeDeg () const
 Return the maximum longitude in the grid in degrees.
double GetLatitudeSpacingDeg () const
 Get the spacing in degrees of the latitude lines of the grid.
double GetLongitudeSpacingDeg () const
 Get the spacing in degrees of the longitude lines of the grid.
Public Member Functions inherited from wsf::coverage::RectangularGrid
 RectangularGrid (const WsfScenario &aScenario)
 RectangularGrid (const RectangularGrid &aOther)
 ~RectangularGrid () override=default
const PointGetPoint (PointId aPointId) const override
std::size_t GetSize () const override
void Invoke (GridAction &aAction) const override
GridAsset GetAsset (PointId aPointId) const override
GridAsset GetAsset (const std::string &aPlatformName) const override
void HasNullDevice (bool &aAnyNull, bool &aAllNull) const override
bool CreatesNewPlatforms () const override
bool IsStructured () const override
std::pair< std::size_t, std::size_t > GetComponentSizes (std::size_t aComponentIndex) const override
std::pair< std::size_t, std::size_t > GetPointIndices (PointId aPointId) const override
const std::string & GetAssetPlatformType () const
 Return the platform type of the assets for this grid.
const std::string & GetAssetDeviceName () const
 Return the device name for the assets for this grid.
double GetAltitude () const
 Return the altitude of the grid points.
bool IsAltitudeAGL () const
double GetLatitudeOriginDeg () const
 Get the origin point in latitude.
double GetLongitudeOriginDeg () const
 Get the origin point in longitude.
Public Member Functions inherited from wsf::coverage::Grid
 Grid (const WsfScenario &aScenario)
 Grid (const Grid &aOther)=default
 ~Grid () override=default
virtual std::size_t GetNumComponents () const
virtual std::string GetComponentName (std::size_t aComponentIndex) const
 Return the name of the specified grid component.
void SetUsedFlag ()
bool IsUsed () const
bool Initialize ()
void CategorizeAssets (const WsfSimulation &aSimulation, const std::string &aCategory) const
bool IsInitialized () const
 Return if this Grid has been initialized.
const ut::CentralBody & GetCentralBody () const
 Return the central body to which this grid's point locations refer.
void SetCentralBody (const ut::CentralBody &aCentralBody)
 Set the central body of this grid.
const std::string & GetGridDataFileName () const
 Return the configured grid data file name.
bool GetSuppressGridPlatforms () const
 Return if this grid is suppressing grid platforms.
void SetSuppressGridPlatforms (bool aSuppress)
 Set if this grid suppresses grid platforms.
bool WriteGridDataFile (TextOutputWriter &aWriter) const
bool WriteGridDataFile () const
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Static Public Attributes

static constexpr const char * cTYPE {"WSF_ZONE_BASED_GRID"}
Static Public Attributes inherited from wsf::coverage::LatLonGrid
static constexpr const char * cTYPE {"WSF_LAT_LON_GRID"}

Protected Member Functions

bool InitializeP () override
Protected Member Functions inherited from wsf::coverage::LatLonGrid
void SetMinimumLatitudeDeg (double aLat)
void SetMaximumLatitudeDeg (double aLat)
void SetMinimumLongitudeDeg (double aLon)
void SetMaximumLongitudeDeg (double aLon)
void SetOrigin (double aLat, double aLon)
bool IsOriginSet () const
bool RemovePoint (PointId aPointId)
Protected Member Functions inherited from wsf::coverage::RectangularGrid
bool CreateRectangularGrid ()
std::string GetPlatformName (PointId aPointId) const
Protected Member Functions inherited from wsf::coverage::Grid
PointId GetNextAvailableId ()
const WsfScenarioGetScenario () const
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
Protected Attributes inherited from wsf::coverage::RectangularGrid
std::string mPlatformType {}
std::string mDeviceName {}
double mAltitude {0.0}
double mLatOriginDeg {}
double mLonOriginDeg {}
size_t mLatSize {}
size_t mLonSize {}
std::map< PointId, PointmPoints {}
std::map< PointId, std::pair< std::size_t, std::size_t > > mIndices {}
std::map< std::string, GridAssetmAssets {}
bool mOriginSet {false}
bool mAltitudeAGL {false}

Detailed Description

This is a regular grid in latitude and longitude bounded by a WsfZone.

Constructor & Destructor Documentation

◆ ZoneBasedGrid() [1/2]

wsf::coverage::ZoneBasedGrid::ZoneBasedGrid ( const WsfScenario & aScenario)
inlineexplicit

◆ ZoneBasedGrid() [2/2]

wsf::coverage::ZoneBasedGrid::ZoneBasedGrid ( const ZoneBasedGrid & aOther)
default

References ZoneBasedGrid().

◆ ~ZoneBasedGrid()

wsf::coverage::ZoneBasedGrid::~ZoneBasedGrid ( )
overridedefault

Member Function Documentation

◆ Clone()

ZoneBasedGrid * wsf::coverage::ZoneBasedGrid::Clone ( ) const
inlineoverridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Reimplemented from wsf::coverage::LatLonGrid.

References ZoneBasedGrid().

◆ GetZoneName()

const std::string & wsf::coverage::ZoneBasedGrid::GetZoneName ( ) const
inline

Return the name of the that defines the boundary of this grid.

◆ InitializeP()

bool wsf::coverage::ZoneBasedGrid::InitializeP ( )
overrideprotectedvirtual

Grid type specific initialization.

Initialization specific to the grid type occurs in this method. In particular, validation on input quantities should occur here. The set of grid points should be defined after this method's successful return, and both GetAsset methods should return valid GridAsset instances for any point in this grid.

Returns
true if initialization is successful; false otherwise.

Reimplemented from wsf::coverage::LatLonGrid.

References WsfObjectTypeList< T >::Find(), WsfZone::GetLatLonExtrema(), WsfObject::GetName(), wsf::coverage::Grid::GetScenario(), WsfScenario::GetZoneTypes(), wsf::coverage::LatLonGrid::InitializeP(), wsf::coverage::LatLonGrid::IsOriginSet(), wsf::coverage::LatLonGrid::SetMaximumLatitudeDeg(), wsf::coverage::LatLonGrid::SetMaximumLongitudeDeg(), wsf::coverage::LatLonGrid::SetMinimumLatitudeDeg(), wsf::coverage::LatLonGrid::SetMinimumLongitudeDeg(), and wsf::coverage::LatLonGrid::SetOrigin().

◆ InvokeOnComponent()

void wsf::coverage::ZoneBasedGrid::InvokeOnComponent ( GridAction & aAction,
std::size_t aComponentIndex ) const
overridevirtual

Invoke the given aAction on the points of the specified grid component.

Reimplemented from wsf::coverage::Grid.

References wsf::coverage::GridAction::Call(), and wsf::coverage::Grid::InvokeOnComponent().

◆ PreparePlatforms()

void wsf::coverage::ZoneBasedGrid::PreparePlatforms ( WsfSimulation & aSimulation)
overridevirtual

Prepare the platforms for this grid.

This method will create or modify the platforms associated with this grid object. In particular, this should mark created platforms as private so they are not sent over DIS. This should also set the side of created platforms so they might be easily removed from the visual tools.

Parameters
aSimulation- The simulation in which this grid's platforms will participate.

Reimplemented from wsf::coverage::RectangularGrid.

References wsf::coverage::CreateGridAction(), WsfObjectTypeList< T >::Find(), wsf::coverage::Point::GetAltitude(), wsf::coverage::Grid::GetCentralBody(), wsf::coverage::Point::GetLatitude(), wsf::coverage::Point::GetLongitude(), WsfObject::GetName(), WsfSimulation::GetScenario(), wsf::coverage::RectangularGrid::GetSize(), WsfScenario::GetZoneTypes(), wsf::coverage::RectangularGrid::Invoke(), wsf::coverage::Grid::PreparePlatforms(), and wsf::coverage::LatLonGrid::RemovePoint().

◆ ProcessInput()

bool wsf::coverage::ZoneBasedGrid::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from wsf::coverage::LatLonGrid.

References wsf::coverage::LatLonGrid::ProcessInput().

Member Data Documentation

◆ cTYPE

const char* wsf::coverage::ZoneBasedGrid::cTYPE {"WSF_ZONE_BASED_GRID"}
staticconstexpr

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