WSF
WsfUniqueId Class Reference

#include <WsfUniqueId.hpp>

Inheritance diagram for WsfUniqueId:

Public Member Functions

 WsfUniqueId ()
 Construtor initializes the unique identifier to 0.
 WsfUniqueId (const WsfUniqueId &)
 Copy constructor initializes the unique identifier to 0.
WsfUniqueIdoperator= (const WsfUniqueId &)
unsigned int GetUniqueId () const
 Get the unique identifier assigned to this object.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.

Protected Member Functions

void AssignUniqueId (WsfSimulation *aSimulationPtr)

Detailed Description

A class that maintains a unique identifier for an object.

It is sometimes beneficial for simulation objects to have the concept of a unique identifier that distinguishes it from all other objects. This provides such a capability. Unique identifiers are NEVER reused within a given simulation instance.

A unique identifier is an unsigned integer so it is very efficient key for a map or a hash_map.

To use this capability, a class must do two things:

  • Inherit from this class.
  • Invoke the AssignUniqueId method from within their Initialize method when being added to a simulation.

Unique identifiers are valid ONLY within the context of a simulation. Objects that are not part of a simulation will return a value of 0.

Constructor & Destructor Documentation

◆ WsfUniqueId() [1/2]

WsfUniqueId::WsfUniqueId ( )
inline

◆ WsfUniqueId() [2/2]

WsfUniqueId::WsfUniqueId ( const WsfUniqueId & )
inline

Copy constructor initializes the unique identifier to 0.

References WsfUniqueId().

Member Function Documentation

◆ AssignUniqueId()

void WsfUniqueId::AssignUniqueId ( WsfSimulation * aSimulationPtr)
protected

Initialize the unique ID with the next unique ID from the simulation. This must be called by the Initialize method in the inheriting class.

Parameters
aSimulationPtrThe simulation in which this object exists.

References WsfSimulation::AssignUniqueId().

Referenced by WsfPlatform::AssignToSimulation(), wsf::comm::Layer::Initialize(), WsfEM_XmtrRcvr::Initialize(), WsfOrbitalEvent::Initialize(), WsfOrbitalMissionSequence::Initialize(), WsfPlatformPart::Initialize(), wsf::comm::Layer::SetID(), and WsfChaffCloud::WsfChaffCloud().

◆ GetUniqueId()

unsigned int WsfUniqueId::GetUniqueId ( ) const
inline

Get the unique identifier assigned to this object.

Referenced by WsfEmitterTypeReporting::AddEmitterReportState(), WsfTargetTypeReporting::AddTargetReportState(), WsfPassiveSensor::PassiveMode::AttemptToDetect(), WsfRIPRProcessor::CommanderPlatform(), WsfRIPRProcessor::CommanderProcessor(), WsfFalseTarget::DropTracks(), WsfPlatform::GetArticulatedPart(), WsfEM_XmtrRcvr::Initialize(), WsfFalseTarget::Initialize(), WsfLOS_Manager::IsTargetVisible(), WsfLOS_Manager::IsTargetVisible(), WsfLOS_Manager::IsTargetVisible(), WsfLOS_Manager::IsTargetVisibleNow(), WsfLOS_Manager::IsTargetVisibleNow(), WsfLOS_Manager::IsTargetVisibleNow(), WsfPlatformPart::JoinGroup(), WsfPlatformPart::LeaveGroup(), WsfLOS_Manager::PartMoveCheck(), WsfLOS_Manager::PartMoved(), WsfLOS_Manager::PlatformDeleted(), WsfLOS_Manager::PlatformMoveCheck(), WsfLOS_Manager::PlatformMoved(), wsf::event::utils::PrintOrbitalManeuverData(), wsf::event::utilsCSV::PrintOrbitalManeuverData(), WsfFalseTarget::RemoveJammer(), WsfEW_SLB_Effect::RemoveJammerXmtr(), WsfEW_SLC_Effect::RemoveJammerXmtr(), WsfMilDisInterface::RemoveXmtrs(), WsfFalseTarget::Rescan(), WsfEventPipeInterface::SendModeActive(), WsfMilEventPipe::SendModeActive(), WsfEventPipeInterface::SendPartStatus(), WsfRF_Jammer::SetEA_DeltaGainTechnique(), WsfRF_Jammer::StartJamming(), WsfRF_Jammer::StopJamming(), WsfRIPRProcessor::SubordinatePlatforms(), WsfRIPRProcessor::SubordinateProcessors(), WsfFalseTarget::Update(), WsfEW_Effect::UpdateCurrentIds(), WsfEW_SimpleFT_Effect::UpdateEffects(), WsfEW_SensorComponent::EW_Mode::UpdateFalseTargetInteractors(), WsfMilDisPlatform::UpdateJammerSystem(), WsfRF_Jammer::UpdateJamming(), WsfEmitterTypeReporting::UpdateReportedEmitterType(), WsfDisEmission::UpdateSensor(), WsfMilDisInterface::UpdateWeapon(), WsfMilDisInterface::UpdateXmtrFromBeam(), UT_DEFINE_SCRIPT_METHOD(), WsfMilEventPipe::WeaponTurnedOff(), and WsfMilEventPipe::WeaponTurnedOn().

◆ operator=()

WsfUniqueId & WsfUniqueId::operator= ( const WsfUniqueId & )
inline

The assignment operator does nothing as it must preserve the unique identification of the target.

References WsfUniqueId().

◆ Serialize()

template<typename T>
void WsfUniqueId::Serialize ( T & aBuff)
inline

For XIO (de)serialization.


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