WSF
WsfComponentT< PARENT_TYPE > Class Template Reference

#include <WsfComponent.hpp>

Inheritance diagram for WsfComponentT< PARENT_TYPE >:
Collaboration diagram for WsfComponentT< PARENT_TYPE >:

Public Types

typedef PARENT_TYPE ParentType
 This is needed to support the WsfComponentList template.

Public Member Functions

 WsfComponentT ()
 WsfComponentT (const WsfComponentT &) noexcept
WsfComponentToperator= (const WsfComponentT &) noexcept
 ~WsfComponentT () override=default
Public Member Functions inherited from WsfComponent
virtual ~WsfComponent ()=default
virtual WsfComponentCloneComponent () const =0
virtual WsfStringId GetComponentName () const =0
virtual const int * GetComponentRoles () const =0
virtual void * QueryInterface (int aRole)=0
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 Initialize (double aSimTime)
virtual bool Initialize2 (double aSimTime)
virtual void PreInput ()
virtual bool ProcessInput (UtInput &aInput)

Parent connection methods.

Instances of this class will have their parent connects maintained through copy.

virtual void ComponentParentChanged (ParentType *aParentPtr)
ParentTypeGetComponentParent () const
void SetComponentParent (ParentType *aParentPtr)

Detailed Description

template<typename PARENT_TYPE>
class WsfComponentT< PARENT_TYPE >

A templated version of a component that supports type-specific attachment. This allows the WsfComponentList template to automatically maintain type-safe component attachments in AddComponent and copy construction.

Member Typedef Documentation

◆ ParentType

template<typename PARENT_TYPE>
typedef PARENT_TYPE WsfComponentT< PARENT_TYPE >::ParentType

This is needed to support the WsfComponentList template.

Constructor & Destructor Documentation

◆ WsfComponentT() [1/2]

template<typename PARENT_TYPE>
WsfComponentT< PARENT_TYPE >::WsfComponentT ( )
inline

◆ WsfComponentT() [2/2]

template<typename PARENT_TYPE>
WsfComponentT< PARENT_TYPE >::WsfComponentT ( const WsfComponentT< PARENT_TYPE > & )
inlinenoexcept

◆ ~WsfComponentT()

template<typename PARENT_TYPE>
WsfComponentT< PARENT_TYPE >::~WsfComponentT ( )
overridedefault

Member Function Documentation

◆ ComponentParentChanged()

template<typename PARENT_TYPE>
virtual void WsfComponentT< PARENT_TYPE >::ComponentParentChanged ( ParentType * aParentPtr)
inlinevirtual

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.

Parameters
aParentPtrPointer to the new parent. The new parent may be null if the attachment was severed.

Reimplemented in wsf::cyber::Protect, WsfCommandChain, WsfIntersectMesh, WsfLASER_XmtrComponent, WsfNavigationErrors, WsfPlatformPart, WsfTrackManager, WsfWeaponPlatformExtension, and WsfZone.

Referenced by WsfComponentT< WsfPlatform >::SetComponentParent().

◆ GetComponentParent()

template<typename PARENT_TYPE>
ParentType * WsfComponentT< PARENT_TYPE >::GetComponentParent ( ) const
inline

◆ operator=()

template<typename PARENT_TYPE>
WsfComponentT & WsfComponentT< PARENT_TYPE >::operator= ( const WsfComponentT< PARENT_TYPE > & )
inlinenoexcept

◆ SetComponentParent()

template<typename PARENT_TYPE>
void WsfComponentT< PARENT_TYPE >::SetComponentParent ( ParentType * aParentPtr)
inline

Set the pointer to the parent.

Parameters
aParentPtrThe pointer to the parent. This can be the null pointer if the component is being told it no longer has a parent.

Referenced by WsfComponentListT< WsfComponentT< Comm > >::AddComponent(), WsfComponentListT< WsfComponentT< Comm > >::RemoveComponent(), WsfComponentListT< WsfComponentT< Comm > >::SetParentOfComponents(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().


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