WSF
WsfEW_RcvrComponent Class Reference

#include <WsfEW_RcvrComponent.hpp>

Inheritance diagram for WsfEW_RcvrComponent:
Collaboration diagram for WsfEW_RcvrComponent:

Public Member Functions

 WsfEW_RcvrComponent ()
 WsfEW_RcvrComponent (const WsfEW_RcvrComponent &aSrc)
WsfEW_RcvrComponentoperator= (const WsfEW_RcvrComponent &)=delete
 ~WsfEW_RcvrComponent () override
virtual void AddInteractor (WsfEM_Xmtr *aXmtrPtr)
Public Member Functions inherited from WsfComponentT< WsfEM_Rcvr >
 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 bool PreInitialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual void PreInput ()
virtual bool ProcessInput (UtInput &aInput)

Static Public Member Functions

static WsfEW_RcvrComponentFind (const WsfEM_Rcvr &aRcvr)
 Find the electronic warfare receiver component for the specified receiver.
static WsfEW_RcvrComponentFindOrCreate (WsfEM_Rcvr &aRcvr)

EW-specific methods

WsfEW_EA_EPGetElectronicProtect () const
void SetElectronicProtect (WsfEW_EA_EP *aElectronicProtectPtr)

WsfComponent required methods.

WsfStringId GetComponentName () const override
WsfComponentCloneComponent () const override
const int * GetComponentRoles () const override
void * QueryInterface (int aRole) override

WsfComponent optional methods.

bool Initialize (double aSimTime) override

WsfEM_RcvrComponent methods.

void RemoveInteractor (WsfEM_Xmtr *aXmtrPtr) override
 Called by WsfEM_Rcvr::RemoveInteractor.

Additional Inherited Members

Public Types inherited from WsfComponentT< WsfEM_Rcvr >
typedef WsfEM_Rcvr ParentType
 This is needed to support the WsfComponentList template.

Constructor & Destructor Documentation

◆ WsfEW_RcvrComponent() [1/2]

WsfEW_RcvrComponent::WsfEW_RcvrComponent ( )

◆ WsfEW_RcvrComponent() [2/2]

WsfEW_RcvrComponent::WsfEW_RcvrComponent ( const WsfEW_RcvrComponent & aSrc)

References WsfEW_RcvrComponent().

◆ ~WsfEW_RcvrComponent()

WsfEW_RcvrComponent::~WsfEW_RcvrComponent ( )
override

Member Function Documentation

◆ CloneComponent()

WsfComponent * WsfEW_RcvrComponent::CloneComponent ( ) const
overridevirtual

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

Implements WsfComponent.

References WsfEW_RcvrComponent().

◆ Find()

WsfEW_RcvrComponent * WsfEW_RcvrComponent::Find ( const WsfEM_Rcvr & aRcvr)
static

Find the electronic warfare receiver component for the specified receiver.

References WsfComponentList::FindByRole(), WsfEM_Rcvr::GetComponents(), and WsfEW_RcvrComponent().

Referenced by FindOrCreate(), and WsfEW_EP::GetElectronicProtect().

◆ FindOrCreate()

WsfEW_RcvrComponent * WsfEW_RcvrComponent::FindOrCreate ( WsfEM_Rcvr & aRcvr)
static

Find the electronic warfare receiver component for the specified receiver. If the component does not exist then it will be created.

References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), Find(), WsfEM_Rcvr::GetComponents(), and WsfEW_RcvrComponent().

Referenced by WsfEW_EP::SetElectronicProtect().

◆ GetComponentName()

WsfStringId WsfEW_RcvrComponent::GetComponentName ( ) const
overridevirtual

Returns the component's name. Each component in a component list has a unique name. Names are usually defined by the user, but they may also be generated by code and prefixed with a '#' to guarantee no collisions with user-defined names.

Implements WsfComponent.

◆ GetComponentRoles()

const int * WsfEW_RcvrComponent::GetComponentRoles ( ) const
overridevirtual

Returns a zero-terminated array of component roles. Note that the array should be in decreasing order of specificity and should generally the inheritance hierarchy. The first entry should be the components 'primary' role. For example a sensor would do the following:

return roles;
@ cWSF_COMPONENT_SENSOR
A 'sensor' component (WsfSensor).
Definition WsfComponentRoles.hpp:105
@ cWSF_COMPONENT_PLATFORM_PART
The component derives from WsfPlatformPart.
Definition WsfComponentRoles.hpp:98
@ cWSF_COMPONENT_ARTICULATED_PART
The component derives from WsfArticulatedPart.
Definition WsfComponentRoles.hpp:99

Implements WsfComponent.

References cWSF_COMPONENT_EW_RCVR.

◆ GetElectronicProtect()

WsfEW_EA_EP * WsfEW_RcvrComponent::GetElectronicProtect ( ) const
inline

◆ Initialize()

bool WsfEW_RcvrComponent::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 WsfComponentT< WsfEM_Rcvr >::GetComponentParent(), WsfEM_XmtrRcvr::GetSimulation(), and ok.

◆ operator=()

WsfEW_RcvrComponent & WsfEW_RcvrComponent::operator= ( const WsfEW_RcvrComponent & )
delete

References WsfEW_RcvrComponent().

◆ QueryInterface()

void * WsfEW_RcvrComponent::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.

References cWSF_COMPONENT_EW_RCVR.

◆ RemoveInteractor()

◆ SetElectronicProtect()

void WsfEW_RcvrComponent::SetElectronicProtect ( WsfEW_EA_EP * aElectronicProtectPtr)

Set the Electronic Protect object for this receiver.

Parameters
aElectronicProtectPtrPointer to the new electronic protect object.
Note
Any existing electronic protect object is deleted.

Referenced by WsfEW_EP::SetElectronicProtect().


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