WSF
WsfEW_XmtrComponent Class Reference

#include <WsfEW_XmtrComponent.hpp>

Inheritance diagram for WsfEW_XmtrComponent:
Collaboration diagram for WsfEW_XmtrComponent:

Public Member Functions

 WsfEW_XmtrComponent ()
 WsfEW_XmtrComponent (const WsfEW_XmtrComponent &aSrc)
WsfEW_XmtrComponentoperator= (const WsfEW_XmtrComponent &)=delete
 ~WsfEW_XmtrComponent () override
Public Member Functions inherited from WsfComponentT< WsfEM_Xmtr >
 WsfComponentT ()
 WsfComponentT (const WsfComponentT &) noexcept
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_XmtrComponentFind (const WsfEM_Xmtr &aXmtr)
 Find the electronic warfare receiver component for the specified receiver.
static WsfEW_XmtrComponentFindOrCreate (WsfEM_Xmtr &aXmtr)

Common infrastructure methods.

bool Initialize (double aSimTime) override
WsfEW_EA_EPGetElectronicAttack () const
 EW-specific transmitter methods.
void SetElectronicAttack (WsfEW_EA_EP *aElectronicAttackPtr)

Component infrastructure methods.

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

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ WsfEW_XmtrComponent() [1/2]

WsfEW_XmtrComponent::WsfEW_XmtrComponent ( )

◆ WsfEW_XmtrComponent() [2/2]

WsfEW_XmtrComponent::WsfEW_XmtrComponent ( const WsfEW_XmtrComponent & aSrc)

References WsfEW_XmtrComponent().

◆ ~WsfEW_XmtrComponent()

WsfEW_XmtrComponent::~WsfEW_XmtrComponent ( )
override

Member Function Documentation

◆ CloneComponent()

WsfComponent * WsfEW_XmtrComponent::CloneComponent ( ) const
overridevirtual

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

Implements WsfComponent.

References WsfEW_XmtrComponent().

◆ Find()

WsfEW_XmtrComponent * WsfEW_XmtrComponent::Find ( const WsfEM_Xmtr & aXmtr)
static

Find the electronic warfare receiver component for the specified receiver.

References WsfComponentList::FindByRole(), WsfEM_Xmtr::GetComponents(), and WsfEW_XmtrComponent().

Referenced by FindOrCreate(), and WsfEW_EA::GetElectronicAttack().

◆ FindOrCreate()

WsfEW_XmtrComponent * WsfEW_XmtrComponent::FindOrCreate ( WsfEM_Xmtr & aXmtr)
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_Xmtr::GetComponents(), and WsfEW_XmtrComponent().

Referenced by WsfEW_EA::SetElectronicAttack().

◆ GetComponentName()

WsfStringId WsfEW_XmtrComponent::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_XmtrComponent::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_XMTR.

◆ GetElectronicAttack()

WsfEW_EA_EP * WsfEW_XmtrComponent::GetElectronicAttack ( ) const
inline

EW-specific transmitter methods.

Referenced by WsfEW_EA::GetElectronicAttack().

◆ Initialize()

bool WsfEW_XmtrComponent::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_Xmtr >::GetComponentParent(), WsfEM_XmtrRcvr::GetSimulation(), and ok.

◆ operator=()

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

References WsfEW_XmtrComponent().

◆ QueryInterface()

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

◆ SetElectronicAttack()

void WsfEW_XmtrComponent::SetElectronicAttack ( WsfEW_EA_EP * aElectronicAttackPtr)

Set the Electronic Attack object for this receiver.

Parameters
aElectronicAttackPtrPointer to the new electronic attack object.
Note
Any existing electronic attack object is deleted.

Referenced by WsfEW_EA::SetElectronicAttack().


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