WSF
WsfChaffEjector Class Reference

#include <WsfChaffEjector.hpp>

Inheritance diagram for WsfChaffEjector:
Collaboration diagram for WsfChaffEjector:

Static Public Member Functions

static void RegisterComponentFactory (WsfScenario &aScenario)

Overrides of WsfSinglePlatformObserver.

void OnPlatformUpdated (double, WsfPlatform *) override

Component infrastructure methods

WsfComponentCloneComponent () const override
void * QueryInterface (int aRole) override
 WsfChaffEjector ()
 WsfChaffEjector (const std::string &aName)
 ~WsfChaffEjector () override
WsfChaffEjectoroperator= (const WsfChaffEjector &aRhs)=delete
bool ProcessInput (UtInput &aInput) override
bool Initialize (double aSimTime) override
void SetLaunchState (double aSimTime, WsfPlatform *aPlatformPtr)
std::unique_ptr< WsfChaffParcelEjectParcel (double aSimTime)
unsigned int GetQuantityRemaining () const
 WsfChaffEjector (const WsfChaffEjector &aSrc)

Additional Inherited Members

Public Types inherited from WsfComponentT< WsfWeapon >
typedef WsfWeapon ParentType
 This is needed to support the WsfComponentList template.
Public Member Functions inherited from WsfSimpleComponentT< WsfWeaponComponent >
 WsfSimpleComponentT ()=default
 Empty constructor for serialization.
 WsfSimpleComponentT (int aRole, WsfStringId aName)
 WsfSimpleComponentT (int aRole)
 WsfSimpleComponentT (WsfStringId aName)
 WsfSimpleComponentT (const WsfSimpleComponentT &aSrc)
WsfSimpleComponentToperator= (const WsfSimpleComponentT &aRhs)
 ~WsfSimpleComponentT () override=default
WsfStringId GetComponentName () const override
const int * GetComponentRoles () const override
WsfWeaponGetWeapon () const
WsfPlatformGetPlatform () const
WsfSimulationGetSimulation () const
virtual void TurnOn (double aSimTime)
virtual void TurnOff (double aSimTime)
virtual bool Initialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual bool PreInitialize (double aSimTime)
virtual bool ProcessInput (UtInput &aInput)
Public Member Functions inherited from WsfComponentT< WsfWeapon >
 WsfComponentT ()
WsfComponentToperator= (const WsfComponentT &) noexcept
 ~WsfComponentT () override=default
virtual void ComponentParentChanged (ParentType *aParentPtr)
ParentTypeGetComponentParent () const
void SetComponentParent (ParentType *aParentPtr)
Public Member Functions inherited from WsfComponent
virtual ~WsfComponent ()=default
virtual int GetComponentInitializationOrder () const
template<typename T>
bool QueryInterfaceT (T *&aRolePtr)
bool ComponentHasRole (int aRole)
 Returns true if the component has the specified role.
virtual void PreInput ()
Public Member Functions inherited from WsfNamed
 WsfNamed ()
 WsfNamed (WsfStringId aName)
 WsfNamed (const WsfNamed &)=default
WsfNamedoperator= (const WsfNamed &)=default
virtual ~WsfNamed ()=default
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)
Public Member Functions inherited from WsfSinglePlatformObserver
virtual ~WsfSinglePlatformObserver ()
virtual void OnPlatformDeleting (double aSimTime, WsfPlatform *aPlatformPtr)
 Called before the platform is actually deleted.
virtual void OnPlatformDeleted (double aSimTime, WsfPlatform *aPlatformPtr)
 Called just before the platform is removed from the simulation.
int mRoles [2]

Constructor & Destructor Documentation

◆ WsfChaffEjector() [1/3]

WsfChaffEjector::WsfChaffEjector ( )

◆ WsfChaffEjector() [2/3]

WsfChaffEjector::WsfChaffEjector ( const std::string & aName)

References WsfChaffEjector().

◆ ~WsfChaffEjector()

WsfChaffEjector::~WsfChaffEjector ( )
override

◆ WsfChaffEjector() [3/3]

WsfChaffEjector::WsfChaffEjector ( const WsfChaffEjector & aSrc)
protected

References WsfChaffEjector().

Member Function Documentation

◆ CloneComponent()

WsfComponent * WsfChaffEjector::CloneComponent ( ) const
overridevirtual

Clones a component. May return null if component does not support clone.

Implements WsfComponent.

References WsfChaffEjector().

◆ EjectParcel()

std::unique_ptr< WsfChaffParcel > WsfChaffEjector::EjectParcel ( double aSimTime)

◆ GetQuantityRemaining()

unsigned int WsfChaffEjector::GetQuantityRemaining ( ) const
inline

Referenced by WsfChaffWeapon::Fire().

◆ Initialize()

bool WsfChaffEjector::Initialize ( double aSimTime)
overridevirtual

Perform phase 1 initialization. This is called by WsfPlatform::Initialize() during phase 1 initialization of the platform. The component should complete validation of input data that could not be done by ProcessInput, as well as any other functions to prepare for simulation use (subject to the next paragraph).

The order in which components are initialized is defined by GetComponentInitializationOrder. In general a component implementation of this method should not be dependent on the state of another component, i.e.: it should not assume that the other components Initialize() method has been called. If such a dependency exists one should use Initialize2() if possible, or specify a value GetComponentInitializationOrder to force things to initialize in a particular order.

Parameters
aSimTimeThe current simulation time.
Returns
true if successful or false if unsuccessful (bad input data, etc.)
Note
This method should NOT add any other components to the platform. This MUST be done in PreInitialize().

Reimplemented from WsfComponent.

References WsfPlatform::AttachObserver(), WsfNamed::GetName(), WsfObject::GetName(), WsfWeaponComponent::GetPlatform(), WsfWeaponComponent::GetWeapon(), and ok.

◆ OnPlatformUpdated()

void WsfChaffEjector::OnPlatformUpdated ( double ,
WsfPlatform *  )
inlineoverrideprotectedvirtual

A callback from the platform subject. This class attaches itself as an observer to the associated platform and through this method is notified whenever the platform is updated (moved).

Reimplemented from WsfSinglePlatformObserver.

◆ operator=()

WsfChaffEjector & WsfChaffEjector::operator= ( const WsfChaffEjector & aRhs)
delete

◆ ProcessInput()

bool WsfChaffEjector::ProcessInput ( UtInput & aInput)
overridevirtual

Evaluate the current input command and determine if it is one processed by the component. The component should get the current command from the input stream and determine if it is one that it recognizes. If it does not recognize the command then it should leave the command in the input stream and return false. If it does recognize the command then it should process the command and return true. If invalid arguments are encountered then it should throw an exception.

Parameters
aInputThe input stream.
Returns
true if the current command was recognized (and processed), or false if the command was not recognized.
Exceptions
UtInput::ExceptionBaseif an invalid input was encountered.

Reimplemented from WsfComponent.

◆ QueryInterface()

void * WsfChaffEjector::QueryInterface ( int aRole)
overridevirtual

Requests a component's role interface. A component can support one or more roles.

Parameters
aRoleThe role whose interface is to be returned.
Returns
A pointer to the object if it supports the indicated role, or 'null' if it does not. Usage: WsfProcessor* procPtrOrNull = (WsfProcessor*)componentPtr->QueryComponentInterface(cWSF_COMPONENT_PROCESSOR);

Implements WsfComponent.

◆ RegisterComponentFactory()

void WsfChaffEjector::RegisterComponentFactory ( WsfScenario & aScenario)
static

◆ SetLaunchState()

void WsfChaffEjector::SetLaunchState ( double aSimTime,
WsfPlatform * aPlatformPtr )

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