|
WSF
|
A platform component used to maintain weapon-related data. More...
#include <WsfWeaponPlatformExtension.hpp>


Public Member Functions | |
| WsfWeaponPlatformExtension () | |
| WsfWeaponPlatformExtension (const WsfWeaponPlatformExtension &aSrc) | |
| ~WsfWeaponPlatformExtension () override | |
| WsfWeaponPlatformExtension & | operator= (const WsfWeaponPlatformExtension &)=delete |
| Public Member Functions inherited from WsfNamed | |
| WsfNamed () | |
| WsfNamed (WsfStringId aName) | |
| WsfNamed (const WsfNamed &)=default | |
| WsfNamed & | operator= (const WsfNamed &)=default |
| virtual | ~WsfNamed ()=default |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
| Public Member Functions inherited from WsfComponentT< WsfPlatform > | |
| WsfComponentT () | |
| WsfComponentT (const WsfComponentT &) noexcept | |
| WsfComponentT & | operator= (const WsfComponentT &) noexcept |
| ~WsfComponentT () override=default | |
| ParentType * | GetComponentParent () 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 void | RegisterComponentFactory (WsfScenario &aScenario) |
| static WsfStringId | GetWeaponEffectsType (WsfPlatform &aPlatform) |
| static WsfWeaponEngagement * | GetWeaponEngagement (const WsfPlatform &aPlatform) |
| static bool | SetWeaponEngagement (WsfPlatform &aPlatform, WsfWeaponEngagement *aEngagementPtr) |
| static WsfWeaponPlatformExtension & | FindOrCreate (WsfPlatform &aPlatform) |
| static WsfWeaponPlatformExtension * | Find (const WsfPlatform &aPlatform) |
Weapon engagement data. | |
| WsfWeaponEngagement * | GetWeaponEngagement () const |
| If this is a weapon platform, return the pointer to the associated engagement object. | |
| bool | SetWeaponEngagement (WsfWeaponEngagement *aEngagementPtr) |
Component infrastructure methods | |
| WsfComponent * | CloneComponent () const override |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| void * | QueryInterface (int aRole) override |
| void | ComponentParentChanged (WsfPlatform *aPlatformPtr) override |
| bool | Initialize (double aSimTime) override |
Weapon effects methods. | |
| WsfStringId | GetWeaponEffectsType () |
| Get the weapon effects type for the platform. | |
| void | SetWeaponEffectsType (WsfStringId aWeaponEffectsType) |
| Set the name of the weapon effects associated with this platform. | |
| void | SetWeaponEffectsType (const WsfVariable< WsfStringId > &aWeaponEffectsType) |
Additional Inherited Members | |
| Public Types inherited from WsfComponentT< WsfPlatform > | |
| typedef WsfPlatform | ParentType |
| This is needed to support the WsfComponentList template. | |
A platform component used to maintain weapon-related data.
| WsfWeaponPlatformExtension::WsfWeaponPlatformExtension | ( | ) |
References WsfNamed::WsfNamed().
Referenced by CloneComponent(), Find(), FindOrCreate(), GetWeaponEffectsType(), GetWeaponEngagement(), operator=(), SetWeaponEngagement(), and WsfWeaponPlatformExtension().
| WsfWeaponPlatformExtension::WsfWeaponPlatformExtension | ( | const WsfWeaponPlatformExtension & | aSrc | ) |
References WsfNamed::WsfNamed(), and WsfWeaponPlatformExtension().
|
override |
References WsfWeaponEngagement::Delete().
|
inlineoverridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
References WsfWeaponPlatformExtension().
|
inlineoverridevirtual |
The parent to which the component is attached has been updated. This virtual method is called whenever the components parent attachment has been changed. This is provided so derived class receives notification of the change.
| aParentPtr | Pointer to the new parent. The new parent may be null if the attachment was severed. |
Reimplemented from WsfComponentT< WsfPlatform >.
|
static |
References WsfComponentList::FindByRole(), and WsfWeaponPlatformExtension().
Referenced by FindOrCreate(), GetWeaponEffectsType(), GetWeaponEngagement(), and SetWeaponEngagement().
|
static |
References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), Find(), and WsfWeaponPlatformExtension().
Referenced by SetWeaponEngagement().
|
inlineoverridevirtual |
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.
References WsfNamed::GetNameId().
|
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:
Implements WsfComponent.
References cWSF_COMPONENT_WEAPON_PLATFORM_EXTENSION.
| WsfStringId WsfWeaponPlatformExtension::GetWeaponEffectsType | ( | ) |
Get the weapon effects type for the platform.
References WsfVariable< T >::Initialize().
Referenced by WsfWeaponEffects::GetWeaponEffectsType().
|
static |
References Find(), GetWeaponEffectsType(), and WsfWeaponPlatformExtension().
Referenced by GetWeaponEffectsType().
|
inline |
If this is a weapon platform, return the pointer to the associated engagement object.
Referenced by WsfWeaponEngagement::Find().
|
static |
References Find(), GetWeaponEngagement(), and WsfWeaponPlatformExtension().
Referenced by WsfWeaponEngagement::Delete(), and GetWeaponEngagement().
|
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.
| aSimTime | The current simulation time. |
Reimplemented from WsfComponent.
References ok.
|
delete |
References WsfWeaponPlatformExtension().
|
overridevirtual |
Requests a component's role interface. A component can support one or more roles.
| aRole | The role whose interface is to be returned. |
Implements WsfComponent.
References cWSF_COMPONENT_WEAPON_PLATFORM_EXTENSION.
|
static |
References WsfScenario::RegisterComponentFactory().
Referenced by WsfWeaponTypes::WsfWeaponTypes().
|
inline |
|
inline |
Set the name of the weapon effects associated with this platform.
|
static |
References Find(), FindOrCreate(), SetWeaponEngagement(), and WsfWeaponPlatformExtension().
Referenced by WsfWeaponEngagement::Assign(), WsfWeaponEngagement::Delete(), SetWeaponEngagement(), and SetWeaponEngagement().
| bool WsfWeaponPlatformExtension::SetWeaponEngagement | ( | WsfWeaponEngagement * | aEngagementPtr | ) |
Attach the weapon engagement object to the platform. Any existing weapon engagement object is simply deleted. Any required initialization of the weapon engagement object will be performed.
| aEngagementPtr | Pointer to the engagement object. The platform assumes ownership of the object. |
References WsfWeaponEngagement::Delete(), WsfNamed::GetName(), ok, and SetWeaponEngagement().