WSF
WsfComponentListT< COMPONENT_TYPE > Class Template Reference

A component list that stores only components of a specified type. More...

#include <WsfComponentList.hpp>

Inheritance diagram for WsfComponentListT< COMPONENT_TYPE >:
Collaboration diagram for WsfComponentListT< COMPONENT_TYPE >:

Classes

class  Iterator

Public Types

using ComponentType = COMPONENT_TYPE
using ParentType = typename COMPONENT_TYPE::ParentType
Public Types inherited from WsfComponentList
using NameAndComponent = std::pair<WsfStringId, WsfComponent*>
using ComponentList = std::vector<NameAndComponent>

Iterator support.

The platform list provides a limited capability to iterate sequential over the list.

Iterator Begin () const
 Return an iterator for the beginning of the component list.
Iterator End () const
 Return an iterator for the end of the component list.
 WsfComponentListT ()
 WsfComponentListT (const WsfComponentListT &aSrc)
 WsfComponentListT (WsfComponentListT &&)=default
 ~WsfComponentListT () override
WsfComponentListToperator= (const WsfComponentListT &aRhs)
WsfComponentListToperator= (WsfComponentListT &&aRhs)
ParentTypeGetParentOfComponents () const
void SetParentOfComponents (ParentType *aComponentParentPtr)
bool AddComponent (ComponentType *aComponentPtr)
ComponentTypeFindComponent (WsfStringId aName) const
ComponentTypeFindComponent (WsfStringId aName, int aRole) const
ComponentTypeFindComponentByRole (int aRole) const
ComponentTypeGetComponentEntryByRole (int aRole, unsigned int aEntry) const
std::vector< ComponentType * > GetComponentsByInitializationOrder () const
 Return a vector of components in the order in which they should be initialized.
bool RemoveComponent (ComponentType *aComponentPtr)
bool ProcessComponentInput (UtInput &aInput)

Additional Inherited Members

Public Member Functions inherited from WsfComponentList
 WsfComponentList ()
 WsfComponentList (const WsfComponentList &aSrc)
 WsfComponentList (WsfComponentList &&)=default
virtual ~WsfComponentList ()
WsfComponentListoperator= (const WsfComponentList &aRhs)
WsfComponentListoperator= (WsfComponentList &&)
bool HasComponents () const
 Returns true if the component list has at least one component.
void DeleteAllComponents ()
 Delete all of the components maintained by the list.
bool DeleteComponent (WsfStringId aName, int aRole)
unsigned int GetComponentCount (int aRole) const
template<class T>
bool DeleteComponent (WsfStringId aName)
template<class T>
bool DeleteComponent ()
template<class T>
T * GetComponent () const
template<class T>
T * GetComponent (WsfStringId aName) const
template<class T>
unsigned int GetComponentCount () const
template<class T>
T * GetComponentEntry (unsigned int aEntry) const
template<class T>
bool FindByRole (T *&aPtr) const
template<typename T>
RoleRange< T > GetComponentRange ()
virtual void ComponentAdded (WsfComponent *aComponentPtr)
virtual void ComponentDeleted (WsfComponent *aComponentPtr)
bool AddComponentP (WsfComponent *aComponentPtr, bool aDoNotify)
void CopyAllP (const WsfComponentList &aSrc, bool aDoNotify)
 Base class implementation of copying a component list.
void DeleteAllP (bool aDoNotify)
 Base class implementation of deleting all components in the list.
bool DeleteComponentP (WsfStringId aName, int aRole, bool aDoNotify)
WsfComponentFindComponentP (WsfStringId aName, int aRole) const
WsfComponentFindComponentP (WsfStringId aName) const
WsfComponentFindComponentByRoleP (int aRole) const
WsfComponentGetComponentEntryByRoleP (int aRole, unsigned int aEntry) const
bool RemoveComponentP (WsfStringId aName, int aRole, bool aDelete, bool aDoNotify)
ComponentList mComponentsByName

Detailed Description

template<class COMPONENT_TYPE>
class WsfComponentListT< COMPONENT_TYPE >

A component list that stores only components of a specified type.

Member Typedef Documentation

◆ ComponentType

template<class COMPONENT_TYPE>
using WsfComponentListT< COMPONENT_TYPE >::ComponentType = COMPONENT_TYPE

◆ ParentType

template<class COMPONENT_TYPE>
using WsfComponentListT< COMPONENT_TYPE >::ParentType = typename COMPONENT_TYPE::ParentType

Constructor & Destructor Documentation

◆ WsfComponentListT() [1/3]

template<class COMPONENT_TYPE>
WsfComponentListT< COMPONENT_TYPE >::WsfComponentListT ( )
inline

◆ WsfComponentListT() [2/3]

template<class COMPONENT_TYPE>
WsfComponentListT< COMPONENT_TYPE >::WsfComponentListT ( const WsfComponentListT< COMPONENT_TYPE > & aSrc)
inline

◆ WsfComponentListT() [3/3]

template<class COMPONENT_TYPE>
WsfComponentListT< COMPONENT_TYPE >::WsfComponentListT ( WsfComponentListT< COMPONENT_TYPE > && )
default

◆ ~WsfComponentListT()

template<class COMPONENT_TYPE>
WsfComponentListT< COMPONENT_TYPE >::~WsfComponentListT ( )
inlineoverride

Member Function Documentation

◆ AddComponent()

template<class COMPONENT_TYPE>
bool WsfComponentListT< COMPONENT_TYPE >::AddComponent ( ComponentType * aComponentPtr)
inline

Referenced by WsfExtEmission::AddSensor(), WsfMilExtInterface::AddWeapon(), WsfChaffWeapon::AddWeaponToSimulation(), WsfPerceptionProcessor::CreatePerceptionProcessor(), WsfSA_Processor::CreateSA_Processor(), wsf::comm::ComponentHW::FindOrCreate(), wsf::comm::ComponentHW_JTIDS::FindOrCreate(), wsf::comm::ComponentHW_LASER::FindOrCreate(), wsf::comm::ComponentHW_Subsurface::FindOrCreate(), wsf::comm::ProtocolIGMP::FindOrCreate(), wsf::comm::router::ProtocolAdHoc::FindOrCreate(), wsf::comm::router::ProtocolLegacy::FindOrCreate(), wsf::comm::router::ProtocolMulticast::FindOrCreate(), wsf::comm::router::ProtocolOSPF::FindOrCreate(), wsf::xio::CommComponent::FindOrCreate(), WsfCTD_SensorComponent::FindOrCreate(), WsfEW_CommComponent::FindOrCreate(), WsfEW_RcvrComponent::FindOrCreate(), WsfEW_SensorComponent::FindOrCreate(), WsfEW_XmtrComponent::FindOrCreate(), WsfExclusionSensorComponent::FindOrCreate(), WsfLaunchHandoffData::FindOrCreate(), WsfMoonLOS_SensorComponent::FindOrCreate(), WsfSolarElevationAtTargetSensorComponent::FindOrCreate(), WsfSolarIlluminationComponent::FindOrCreate(), WsfTRIMSIM_SensorComponent::FindOrCreate(), WsfWeaponPlatformExtension::FindOrCreate(), WsfWeaponTaskManager::FindOrCreate(), WsfUplinkProcessor::GetUplinkProcessor(), WsfExplicitWeapon::InitializeCommandChains(), WsfDisWeaponEvents::InitiateWeaponTransfer(), wsf::UCI_AMTI_Component::InjectConditionally(), wsf::UCI_ESM_Component::InjectConditionally(), wsf::UCI_IRST_Component::InjectConditionally(), WsfObjectTypeListBase::LoadComponentP(), WsfCallbackTypes::LoadInstance(), WsfZoneTypes::LoadInstance(), wsf::comm::ProtocolTypes::LoadProtocolComponent(), wsf::comm::router::ProtocolTypes::LoadProtocolComponent(), WsfLaserWeapon::PreInitialize(), and WsfWeaponServer::ProcessCommand().

◆ Begin()

◆ End()

◆ FindComponent() [1/2]

◆ FindComponent() [2/2]

template<class COMPONENT_TYPE>
ComponentType * WsfComponentListT< COMPONENT_TYPE >::FindComponent ( WsfStringId aName,
int aRole ) const
inline

◆ FindComponentByRole()

◆ GetComponentEntryByRole()

◆ GetComponentsByInitializationOrder()

template<class COMPONENT_TYPE>
std::vector< ComponentType * > WsfComponentListT< COMPONENT_TYPE >::GetComponentsByInitializationOrder ( ) const
inline

Return a vector of components in the order in which they should be initialized.

◆ GetParentOfComponents()

template<class COMPONENT_TYPE>
ParentType * WsfComponentListT< COMPONENT_TYPE >::GetParentOfComponents ( ) const
inline

Retrieve the pointer to the parent/owner of the components owned by this list.

Returns
The pointer to the parent. This can be the null pointer.

◆ operator=() [1/2]

template<class COMPONENT_TYPE>
WsfComponentListT & WsfComponentListT< COMPONENT_TYPE >::operator= ( const WsfComponentListT< COMPONENT_TYPE > & aRhs)
inline

◆ operator=() [2/2]

template<class COMPONENT_TYPE>
WsfComponentListT & WsfComponentListT< COMPONENT_TYPE >::operator= ( WsfComponentListT< COMPONENT_TYPE > && aRhs)
inline

◆ ProcessComponentInput()

template<class COMPONENT_TYPE>
bool WsfComponentListT< COMPONENT_TYPE >::ProcessComponentInput ( UtInput & aInput)
inline

◆ RemoveComponent()

template<class COMPONENT_TYPE>
bool WsfComponentListT< COMPONENT_TYPE >::RemoveComponent ( ComponentType * aComponentPtr)
inline

◆ SetParentOfComponents()

template<class COMPONENT_TYPE>
void WsfComponentListT< COMPONENT_TYPE >::SetParentOfComponents ( ParentType * aComponentParentPtr)
inline

Set the pointer to the parent/owner of the components owned by this list.

The only explicit call should be in the body of the copy constructor of the object that owns the list. It CANNOT be done in the initializer list of the copy constructor because the owning object is in an indeterminate state. The methods SetComponentParent and ComponentListUpdated are not guaranteed to be safe, so they must be deferred to the body of the copy constructor.

Referenced by WsfComponentListT< WsfComponentT< Comm > >::operator=(), and WsfComponentListT< WsfComponentT< Comm > >::operator=().


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