WSF
WsfObjectTypeListBase Class Referenceabstract

Base class for WsfObjectTypeList. Provides most of the implementation. More...

#include <WsfObjectTypeListBase.hpp>

Inheritance diagram for WsfObjectTypeListBase:
Collaboration diagram for WsfObjectTypeListBase:

Public Types

enum  Flags {
  cREDEFINITION_ALLOWED = 1 , cSINGULAR_BASE_TYPE = 2 , cOBJECT_FACTORY_BASE = 4 , cNO_DELAY_LOAD = 8 ,
  cSIGNATURE_FLAGS = cREDEFINITION_ALLOWED | cNO_DELAY_LOAD
}
Public Types inherited from WsfObjectTypeListBaseI
typedef std::vector< WsfStringIdTypeIdList

Public Member Functions

 WsfObjectTypeListBase (const WsfObjectTypeListBase &)=delete
WsfObjectTypeListBaseoperator= (const WsfObjectTypeListBase &)=delete
 WsfObjectTypeListBase (unsigned int aFlags, const std::string &aBlockName=std::string(), WsfScenario *aScenarioPtr=nullptr)
 ~WsfObjectTypeListBase () override
void Clear () override
 Clear (Erase) all type entries.
void GetTypeIds (TypeIdList &aListOfIds) const override
 Return a vector of the type identifiers currently being controlled by this list.
bool ProcessInput (UtInput &aInput) override
int Size () const
 Return the current number of types being maintained by the list.
WsfObjectClone (WsfStringId aId) const override=0
WsfObjectFind (WsfStringId aId) const override=0
const std::string & GetBlockName () const override
WsfScenarioGetScenario () const
Public Member Functions inherited from WsfObjectTypeListBaseI
virtual ~WsfObjectTypeListBaseI ()=default
virtual void CompleteLoad ()

Protected Types

typedef std::map< WsfStringId, std::unique_ptr< WsfObject > > TypeMap

Protected Member Functions

WsfDeferredInputGetDeferredInput () const
bool CanDelayLoad () const
bool AddP (WsfStringId aId, std::unique_ptr< WsfObject > aDefinitionPtr)
WsfObjectCloneP (WsfStringId aId) const
virtual WsfObjectFindP (WsfStringId aId) const
virtual bool InitializeTypeP (WsfObject *aObjectPtr)=0
bool LoadTypeP (UtInput &aInput, WsfObject *&aLoadedObjectPtr)
virtual bool DeferredLoadTypeP (UtInput &aInput, WsfObject *&aLoadedObjectPtr)
bool DeleteComponentP (UtInput &aInput, WsfPlatform &aPlatform, int aRole, bool aIsNamed)
bool LoadComponentP (UtInput &aInput, WsfPlatform &aPlatform, bool aIsAdding, int aRole, bool aIsNamed, bool aIsEditable)

Protected Attributes

TypeMap mTypeMap
std::vector< std::unique_ptr< WsfObject > > mRedefinedTypes
 A list of type objects that have been redefined.
std::set< WsfStringIdmCoreTypes
unsigned int mFlags
const std::string mBlockName
WsfObject *(* mCreateSingularTypeFunction )()
WsfObject *(* mFactoryCreateFunction )(void *aListPtr, const std::string &aTypeName)
WsfObject *(* mFactoryCreateDefault )()
void * mFactoryPtr
WsfScenariomScenarioPtr

Friends

class WsfObjectTypeListDetail::LoadTypeP_Later

Detailed Description

Base class for WsfObjectTypeList. Provides most of the implementation.

Member Typedef Documentation

◆ TypeMap

typedef std::map<WsfStringId, std::unique_ptr<WsfObject> > WsfObjectTypeListBase::TypeMap
protected

Member Enumeration Documentation

◆ Flags

Enumerator
cREDEFINITION_ALLOWED 
cSINGULAR_BASE_TYPE 
cOBJECT_FACTORY_BASE 
cNO_DELAY_LOAD 
cSIGNATURE_FLAGS 

Constructor & Destructor Documentation

◆ WsfObjectTypeListBase() [1/2]

◆ WsfObjectTypeListBase() [2/2]

WsfObjectTypeListBase::WsfObjectTypeListBase ( unsigned int aFlags,
const std::string & aBlockName = std::string(),
WsfScenario * aScenarioPtr = nullptr )

◆ ~WsfObjectTypeListBase()

WsfObjectTypeListBase::~WsfObjectTypeListBase ( )
override

References Clear().

Member Function Documentation

◆ AddP()

bool WsfObjectTypeListBase::AddP ( WsfStringId aId,
std::unique_ptr< WsfObject > aDefinitionPtr )
protected

◆ CanDelayLoad()

bool WsfObjectTypeListBase::CanDelayLoad ( ) const
inlineprotected

References cNO_DELAY_LOAD, and mFlags.

Referenced by CloneP(), and LoadTypeP().

◆ Clear()

void WsfObjectTypeListBase::Clear ( )
overridevirtual

Clear (Erase) all type entries.

Implements WsfObjectTypeListBaseI.

References mCoreTypes, mRedefinedTypes, and mTypeMap.

Referenced by ~WsfObjectTypeListBase().

◆ Clone()

WsfObject * WsfObjectTypeListBase::Clone ( WsfStringId aId) const
overridepure virtual

Implements WsfObjectTypeListBaseI.

Implemented in WsfEM_AttenuationTypes, WsfObjectTypeList< T >, WsfObjectTypeList< Attack >, WsfObjectTypeList< CN2 >, WsfObjectTypeList< Comm >, WsfObjectTypeList< ComputerPart >, WsfObjectTypeList< Constraint >, WsfObjectTypeList< Effect >, WsfObjectTypeList< Grid >, WsfObjectTypeList< Measure >, WsfObjectTypeList< MeasureOutput >, WsfObjectTypeList< Medium >, WsfObjectTypeList< Network >, WsfObjectTypeList< OrbitalPropagatorCondition >, WsfObjectTypeList< Protect >, WsfObjectTypeList< ProtocolInterface >, WsfObjectTypeList< Router >, WsfObjectTypeList< SensorErrorModelBase >, WsfObjectTypeList< Tool >, WsfObjectTypeList< TrackExtrapolationStrategy >, WsfObjectTypeList< UCI_Component >, WsfObjectTypeList< wsf::coverage::Coverage >, WsfObjectTypeList< wsf::SensorErrorModelBase >, WsfObjectTypeList< wsf::space::Atmosphere >, WsfObjectTypeList< WsfAcousticSignature >, WsfObjectTypeList< WsfAdvancedBehaviorTreeNode >, WsfObjectTypeList< WsfAero >, WsfObjectTypeList< WsfAntennaPattern >, WsfObjectTypeList< WsfAttitudeController >, WsfObjectTypeList< WsfBehaviorTreeNode >, WsfObjectTypeList< WsfCallback >, WsfObjectTypeList< WsfChaffParcel >, WsfObjectTypeList< WsfCorrelationStrategy >, WsfObjectTypeList< WsfEM_Attenuation >, WsfObjectTypeList< WsfEM_Clutter >, WsfObjectTypeList< WsfEM_Propagation >, WsfObjectTypeList< WsfEW_EA_EP >, WsfObjectTypeList< WsfEW_Effect >, WsfObjectTypeList< WsfEW_Technique >, WsfObjectTypeList< WsfFalseTarget >, WsfObjectTypeList< WsfFalseTargetScreener >, WsfObjectTypeList< WsfFilter >, WsfObjectTypeList< WsfFuel >, WsfObjectTypeList< WsfFusionStrategy >, WsfObjectTypeList< WsfGroup >, WsfObjectTypeList< WsfHighEnergyLaser >, WsfObjectTypeList< WsfInfraredSignature >, WsfObjectTypeList< WsfInherentContrast >, WsfObjectTypeList< WsfIntersectMesh >, WsfObjectTypeList< WsfLaunchComputer >, WsfObjectTypeList< WsfMaskingPattern >, WsfObjectTypeList< WsfMover >, WsfObjectTypeList< WsfMultiresolutionPlatformComponent< DerivedComponent > >, WsfObjectTypeList< WsfNoiseCloud >, WsfObjectTypeList< WsfOpticalReflectivity >, WsfObjectTypeList< WsfOpticalSignature >, WsfObjectTypeList< WsfOrbitalDynamicsTerm >, WsfObjectTypeList< WsfOrbitalEvent >, WsfObjectTypeList< WsfOrbitalIntegrator >, WsfObjectTypeList< WsfOrbitalManeuvering >, WsfObjectTypeList< WsfPathFinder >, WsfObjectTypeList< WsfPlatform >, WsfObjectTypeList< WsfProcessor >, WsfObjectTypeList< WsfRadarSignature >, WsfObjectTypeList< WsfRoute >, WsfObjectTypeList< WsfRouteNetwork >, WsfObjectTypeList< WsfSensor >, WsfObjectTypeList< WsfThermalSystem >, WsfObjectTypeList< WsfThermalSystemComponent >, WsfObjectTypeList< WsfTrackReportingStrategy >, WsfObjectTypeList< WsfVisualPart >, WsfObjectTypeList< WsfWeapon >, WsfObjectTypeList< WsfWeaponEffects >, and WsfObjectTypeList< WsfZone >.

◆ CloneP()

◆ DeferredLoadTypeP()

bool WsfObjectTypeListBase::DeferredLoadTypeP ( UtInput & aInput,
WsfObject *& aLoadedObjectPtr )
protectedvirtual

Reimplemented in WsfProcessorTypes.

References LoadTypeP().

Referenced by InitializeTypeP().

◆ DeleteComponentP()

bool WsfObjectTypeListBase::DeleteComponentP ( UtInput & aInput,
WsfPlatform & aPlatform,
int aRole,
bool aIsNamed )
protected

Process input to delete a component instance from a platform.

Parameters
aInputThe current input stream.
aPlatformA reference to the platform.
aRoleThe role of the component (for 'edit').
aIsNamed'true' if the component is explicitly named, or false if it is unnamed.
Returns
true if the input was recognized and processed, 'false' if the input was not processed.
Exceptions
UtInput::BadValueif the requested component instance does not exist.

References WsfComponentList::DeleteComponent(), and mBlockName.

Referenced by WsfObjectTypeList< SensorErrorModelBase >::DeleteNamedComponent(), WsfObjectTypeList< SensorErrorModelBase >::DeleteUnnamedComponent(), and InitializeTypeP().

◆ Find()

WsfObject * WsfObjectTypeListBase::Find ( WsfStringId aId) const
overridepure virtual

Implements WsfObjectTypeListBaseI.

Implemented in WsfObjectTypeList< T >, WsfObjectTypeList< Attack >, WsfObjectTypeList< CN2 >, WsfObjectTypeList< Comm >, WsfObjectTypeList< ComputerPart >, WsfObjectTypeList< Constraint >, WsfObjectTypeList< Effect >, WsfObjectTypeList< Grid >, WsfObjectTypeList< Measure >, WsfObjectTypeList< MeasureOutput >, WsfObjectTypeList< Medium >, WsfObjectTypeList< Network >, WsfObjectTypeList< OrbitalPropagatorCondition >, WsfObjectTypeList< Protect >, WsfObjectTypeList< ProtocolInterface >, WsfObjectTypeList< Router >, WsfObjectTypeList< SensorErrorModelBase >, WsfObjectTypeList< Tool >, WsfObjectTypeList< TrackExtrapolationStrategy >, WsfObjectTypeList< UCI_Component >, WsfObjectTypeList< wsf::coverage::Coverage >, WsfObjectTypeList< wsf::SensorErrorModelBase >, WsfObjectTypeList< wsf::space::Atmosphere >, WsfObjectTypeList< WsfAcousticSignature >, WsfObjectTypeList< WsfAdvancedBehaviorTreeNode >, WsfObjectTypeList< WsfAero >, WsfObjectTypeList< WsfAntennaPattern >, WsfObjectTypeList< WsfAttitudeController >, WsfObjectTypeList< WsfBehaviorTreeNode >, WsfObjectTypeList< WsfCallback >, WsfObjectTypeList< WsfChaffParcel >, WsfObjectTypeList< WsfCorrelationStrategy >, WsfObjectTypeList< WsfEM_Attenuation >, WsfObjectTypeList< WsfEM_Clutter >, WsfObjectTypeList< WsfEM_Propagation >, WsfObjectTypeList< WsfEW_EA_EP >, WsfObjectTypeList< WsfEW_Effect >, WsfObjectTypeList< WsfEW_Technique >, WsfObjectTypeList< WsfFalseTarget >, WsfObjectTypeList< WsfFalseTargetScreener >, WsfObjectTypeList< WsfFilter >, WsfObjectTypeList< WsfFuel >, WsfObjectTypeList< WsfFusionStrategy >, WsfObjectTypeList< WsfGroup >, WsfObjectTypeList< WsfHighEnergyLaser >, WsfObjectTypeList< WsfInfraredSignature >, WsfObjectTypeList< WsfInherentContrast >, WsfObjectTypeList< WsfIntersectMesh >, WsfObjectTypeList< WsfLaunchComputer >, WsfObjectTypeList< WsfMaskingPattern >, WsfObjectTypeList< WsfMover >, WsfObjectTypeList< WsfMultiresolutionPlatformComponent< DerivedComponent > >, WsfObjectTypeList< WsfNoiseCloud >, WsfObjectTypeList< WsfOpticalReflectivity >, WsfObjectTypeList< WsfOpticalSignature >, WsfObjectTypeList< WsfOrbitalDynamicsTerm >, WsfObjectTypeList< WsfOrbitalEvent >, WsfObjectTypeList< WsfOrbitalIntegrator >, WsfObjectTypeList< WsfOrbitalManeuvering >, WsfObjectTypeList< WsfPathFinder >, WsfObjectTypeList< WsfPlatform >, WsfObjectTypeList< WsfProcessor >, WsfObjectTypeList< WsfRadarSignature >, WsfObjectTypeList< WsfRoute >, WsfObjectTypeList< WsfRouteNetwork >, WsfObjectTypeList< WsfSensor >, WsfObjectTypeList< WsfThermalSystem >, WsfObjectTypeList< WsfThermalSystemComponent >, WsfObjectTypeList< WsfTrackReportingStrategy >, WsfObjectTypeList< WsfVisualPart >, WsfObjectTypeList< WsfWeapon >, WsfObjectTypeList< WsfWeaponEffects >, and WsfObjectTypeList< WsfZone >.

◆ FindP()

WsfObject * WsfObjectTypeListBase::FindP ( WsfStringId aId) const
protectedvirtual

◆ GetBlockName()

const std::string & WsfObjectTypeListBase::GetBlockName ( ) const
inlineoverridevirtual

Implements WsfObjectTypeListBaseI.

References mBlockName.

◆ GetDeferredInput()

◆ GetScenario()

◆ GetTypeIds()

void WsfObjectTypeListBase::GetTypeIds ( TypeIdList & aListOfIds) const
overridevirtual

◆ InitializeTypeP()

virtual bool WsfObjectTypeListBase::InitializeTypeP ( WsfObject * aObjectPtr)
protectedpure virtual

Implemented in WsfObjectTypeList< T >, WsfObjectTypeList< Attack >, WsfObjectTypeList< CN2 >, WsfObjectTypeList< Comm >, WsfObjectTypeList< ComputerPart >, WsfObjectTypeList< Constraint >, WsfObjectTypeList< Effect >, WsfObjectTypeList< Grid >, WsfObjectTypeList< Measure >, WsfObjectTypeList< MeasureOutput >, WsfObjectTypeList< Medium >, WsfObjectTypeList< Network >, WsfObjectTypeList< OrbitalPropagatorCondition >, WsfObjectTypeList< Protect >, WsfObjectTypeList< ProtocolInterface >, WsfObjectTypeList< Router >, WsfObjectTypeList< SensorErrorModelBase >, WsfObjectTypeList< Tool >, WsfObjectTypeList< TrackExtrapolationStrategy >, WsfObjectTypeList< UCI_Component >, WsfObjectTypeList< wsf::coverage::Coverage >, WsfObjectTypeList< wsf::SensorErrorModelBase >, WsfObjectTypeList< wsf::space::Atmosphere >, WsfObjectTypeList< WsfAcousticSignature >, WsfObjectTypeList< WsfAdvancedBehaviorTreeNode >, WsfObjectTypeList< WsfAero >, WsfObjectTypeList< WsfAntennaPattern >, WsfObjectTypeList< WsfAttitudeController >, WsfObjectTypeList< WsfBehaviorTreeNode >, WsfObjectTypeList< WsfCallback >, WsfObjectTypeList< WsfChaffParcel >, WsfObjectTypeList< WsfCorrelationStrategy >, WsfObjectTypeList< WsfEM_Attenuation >, WsfObjectTypeList< WsfEM_Clutter >, WsfObjectTypeList< WsfEM_Propagation >, WsfObjectTypeList< WsfEW_EA_EP >, WsfObjectTypeList< WsfEW_Effect >, WsfObjectTypeList< WsfEW_Technique >, WsfObjectTypeList< WsfFalseTarget >, WsfObjectTypeList< WsfFalseTargetScreener >, WsfObjectTypeList< WsfFilter >, WsfObjectTypeList< WsfFuel >, WsfObjectTypeList< WsfFusionStrategy >, WsfObjectTypeList< WsfGroup >, WsfObjectTypeList< WsfHighEnergyLaser >, WsfObjectTypeList< WsfInfraredSignature >, WsfObjectTypeList< WsfInherentContrast >, WsfObjectTypeList< WsfIntersectMesh >, WsfObjectTypeList< WsfLaunchComputer >, WsfObjectTypeList< WsfMaskingPattern >, WsfObjectTypeList< WsfMover >, WsfObjectTypeList< WsfMultiresolutionPlatformComponent< DerivedComponent > >, WsfObjectTypeList< WsfNoiseCloud >, WsfObjectTypeList< WsfOpticalReflectivity >, WsfObjectTypeList< WsfOpticalSignature >, WsfObjectTypeList< WsfOrbitalDynamicsTerm >, WsfObjectTypeList< WsfOrbitalEvent >, WsfObjectTypeList< WsfOrbitalIntegrator >, WsfObjectTypeList< WsfOrbitalManeuvering >, WsfObjectTypeList< WsfPathFinder >, WsfObjectTypeList< WsfPlatform >, WsfObjectTypeList< WsfProcessor >, WsfObjectTypeList< WsfRadarSignature >, WsfObjectTypeList< WsfRoute >, WsfObjectTypeList< WsfRouteNetwork >, WsfObjectTypeList< WsfSensor >, WsfObjectTypeList< WsfThermalSystem >, WsfObjectTypeList< WsfThermalSystemComponent >, WsfObjectTypeList< WsfTrackReportingStrategy >, WsfObjectTypeList< WsfVisualPart >, WsfObjectTypeList< WsfWeapon >, WsfObjectTypeList< WsfWeaponEffects >, and WsfObjectTypeList< WsfZone >.

References DeferredLoadTypeP(), DeleteComponentP(), LoadComponentP(), and LoadTypeP().

Referenced by LoadTypeP().

◆ LoadComponentP()

bool WsfObjectTypeListBase::LoadComponentP ( UtInput & aInput,
WsfPlatform & aPlatform,
bool aIsAdding,
int aRole,
bool aIsNamed,
bool aIsEditable )
protected

Process input to add or edit a component instance on a platform. This method looks at the current input stream and decides if the input pertains to a platform component of the object type maintained by this type list.

Parameters
aInputThe current input stream.
aPlatformA reference to the platform.
aIsAdding'true' if adding a new component, or 'false' if to edit an existing component.
aRoleThe role of the component.
aIsNamed'true' if the component is explicitly named, or false if it is unnamed.
aIsEditable'true' if the component can be edited or modified while added to a platform, 'false' otherwise.
Returns
true if the input was recognized and processed, 'false' if the input was not processed.
Exceptions
UtInput::BadValueif:
  • aIsAdding is true and the requested base type does not exist.
  • aIsAdding is true and the requested instance name already exists on the platform.
  • aIsAdding is false and the requested instance name does not exist on the platform.
UtInput::OutOfContextif:
  • aIsEditable is false, aIsAdding is false, and the input is requesting an edit.

References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), CloneP(), WsfComponentListT< COMPONENT_TYPE >::FindComponent(), GetDeferredInput(), mBlockName, WsfDeferredInput::Requires(), and WsfObject::SetName().

Referenced by InitializeTypeP(), WsfObjectTypeList< SensorErrorModelBase >::LoadNamedComponent(), WsfObjectTypeList< SensorErrorModelBase >::LoadUnnamedComponent(), and WsfObjectTypeList< SensorErrorModelBase >::LoadUnnamedComponentWithoutEdit().

◆ LoadTypeP()

◆ operator=()

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

◆ ProcessInput()

bool WsfObjectTypeListBase::ProcessInput ( UtInput & aInput)
overridevirtual

Implements WsfObjectTypeListBaseI.

Reimplemented in WsfPathFinderTypes, and WsfPlatformTypes.

◆ Size()

int WsfObjectTypeListBase::Size ( ) const
inline

Return the current number of types being maintained by the list.

References mTypeMap.

◆ WsfObjectTypeListDetail::LoadTypeP_Later

friend class WsfObjectTypeListDetail::LoadTypeP_Later
friend

Member Data Documentation

◆ mBlockName

const std::string WsfObjectTypeListBase::mBlockName
protected

◆ mCoreTypes

◆ mCreateSingularTypeFunction

◆ mFactoryCreateDefault

WsfObject *(* WsfObjectTypeListBase::mFactoryCreateDefault) ()
protected

◆ mFactoryCreateFunction

WsfObject *(* WsfObjectTypeListBase::mFactoryCreateFunction) (void *aListPtr, const std::string &aTypeName)
protected

◆ mFactoryPtr

void* WsfObjectTypeListBase::mFactoryPtr
protected

◆ mFlags

unsigned int WsfObjectTypeListBase::mFlags
protected

◆ mRedefinedTypes

std::vector<std::unique_ptr<WsfObject> > WsfObjectTypeListBase::mRedefinedTypes
protected

A list of type objects that have been redefined.

Referenced by AddP(), Clear(), and WsfObjectTypeListBase().

◆ mScenarioPtr

WsfScenario* WsfObjectTypeListBase::mScenarioPtr
protected

◆ mTypeMap


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