|
WSF
|
#include <WsfObjectTypeList.hpp>


Classes | |
| struct | LoadResult |
| Result of a LoadType() operation. More... | |
Public Types | |
| typedef T | ObjectType |
| typedef std::vector< T * > | ObjectPtrList |
| Public Types inherited from WsfObjectTypeListBase | |
| 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< WsfStringId > | TypeIdList |
Public Member Functions | |
| WsfObjectTypeList (WsfScenario &aScenario, unsigned int aFlags, const std::string &aBlockName) | |
| WsfObjectTypeList (WsfScenario &aScenario, const std::string &aBlockName) | |
| bool | Add (WsfStringId aId, std::unique_ptr< T > aDefinitionPtr) |
| bool | AddCoreType (WsfStringId aId, std::unique_ptr< T > aDefinitionPtr) |
| T * | Clone (WsfStringId aId) const override |
| T * | Find (WsfStringId aId) const override |
| ObjectPtrList | GetCoreTypes () const |
| Returns a list of core types, i.e. types added via AddCoreType. | |
| void | GetCurrentTypes (ObjectPtrList &aListOfPtrs) const |
| void | GetCurrentUserTypes (ObjectPtrList &aListOfPtrs) const |
| Returns the list of types defined by the user (no core / builtin types). | |
| bool | IsType (WsfStringId aTypeName) const |
| void | SetSingularBaseType () |
| template<typename FACTORY_LIST> | |
| void | SetObjectFactory (const FACTORY_LIST *aFactoryListPtr) |
| template<typename DEFAULT_TYPE> | |
| void | SetObjectFactoryDefault () |
| virtual LoadResult | LoadType (UtInput &aInput) |
| bool | ProcessInput (UtInput &aInput) override |
| virtual bool | InitializeType (ObjectType *aTypePtr) |
| Public Member Functions inherited from WsfObjectTypeListBase | |
| WsfObjectTypeListBase (const WsfObjectTypeListBase &)=delete | |
| WsfObjectTypeListBase & | operator= (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. | |
| const std::string & | GetBlockName () const override |
| WsfScenario * | GetScenario () const |
| Public Member Functions inherited from WsfObjectTypeListBaseI | |
| virtual | ~WsfObjectTypeListBaseI ()=default |
| virtual void | CompleteLoad () |
Static Protected Member Functions | |
| template<typename DEFAULT_TYPE> | |
| static WsfObject * | CreateDefaultFunction () |
| static WsfObject * | CreateFunction () |
| template<typename FACTORY_LIST> | |
| static WsfObject * | FactoryCreateFunction (void *aListPtr, const std::string &aTypeName) |
Helper methods for components that utilize type lists. | |
These are invoked from the component factories to facilitate the adding, editing and deleting of component instances on platforms. | |
| bool | LoadNamedComponent (UtInput &aInput, WsfPlatform &aPlatform, bool aIsAdding, int aRole) |
| bool | LoadUnnamedComponent (UtInput &aInput, WsfPlatform &aPlatform, bool aIsAdding, int aRole) |
| bool | LoadUnnamedComponentWithoutEdit (UtInput &aInput, WsfPlatform &aPlatform, bool aIsAdding, int aRole) |
| bool | DeleteNamedComponent (UtInput &aInput, WsfPlatform &aPlatform, int aRole) |
| bool | DeleteUnnamedComponent (UtInput &aInput, WsfPlatform &aPlatform, int aRole) |
| bool | InitializeTypeP (WsfObject *aObjectPtr) override |
Additional Inherited Members | |
| Protected Types inherited from WsfObjectTypeListBase | |
| typedef std::map< WsfStringId, std::unique_ptr< WsfObject > > | TypeMap |
| Protected Member Functions inherited from WsfObjectTypeListBase | |
| WsfDeferredInput & | GetDeferredInput () const |
| bool | CanDelayLoad () const |
| bool | AddP (WsfStringId aId, std::unique_ptr< WsfObject > aDefinitionPtr) |
| WsfObject * | CloneP (WsfStringId aId) const |
| virtual WsfObject * | FindP (WsfStringId aId) const |
| 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 inherited from WsfObjectTypeListBase | |
| TypeMap | mTypeMap |
| std::vector< std::unique_ptr< WsfObject > > | mRedefinedTypes |
| A list of type objects that have been redefined. | |
| std::set< WsfStringId > | mCoreTypes |
| unsigned int | mFlags |
| const std::string | mBlockName |
| WsfObject *(* | mCreateSingularTypeFunction )() |
| WsfObject *(* | mFactoryCreateFunction )(void *aListPtr, const std::string &aTypeName) |
| WsfObject *(* | mFactoryCreateDefault )() |
| void * | mFactoryPtr |
| WsfScenario * | mScenarioPtr |
A template class for defining a list of 'type' objects.
A 'type' object is one that can be cloned to create specific 'instances' of the type. For instance, a 'platform_type' of 'Honda_Civic' can be created added to a 'platform_type' list. Instances of 'Honda_Civic' can then cloned and added to the simulation.
Each class the supports object types instantiates one of these. The user or the input factories can populate these type lists and instantiate objects from them.
| typedef std::vector<T*> WsfObjectTypeList< T >::ObjectPtrList |
| typedef T WsfObjectTypeList< T >::ObjectType |
|
inline |
|
inline |
|
inline |
Add a new type with the given name.
The return value will be 'true' if the type was successfully added and 'false' if not (i.e.: it attempts to duplicate a type that already exists. This will take ownership of aDefinitionPtr.
Referenced by Fires::FiresTables::AddedToScenario(), wsf::six_dof::TypeManager::AddedToScenario(), WsfAirCombatTypeManager::AddedToScenario(), WsfP6DOF_TypeManager::AddedToScenario(), WsfSpaceExtension::AddedToScenario(), WsfMilExtInterface::CompleteLoad(), WsfThermalSystem::ProcessInput(), StubInterface::StubInterface(), WsfL16_Extension::WsfL16_Extension(), and WsfRIPR_ModuleSetup::WsfRIPR_ModuleSetup().
|
inline |
Add a new core type with the given name. Core types are defined by C++ code, and cannot be overwritten.
The return value will be 'true' if the type was successfully added and 'false' if no (i.e.: it attempts to duplicate a type that already exists). This takes ownership of the aDefinitionPtr.
Referenced by IADSC2ScenarioExtension::AddedToScenario(), WsfBrawler::AddedToScenario(), WsfMilExtension::AddedToScenario(), WsfSOSM_Interface::AddedToScenario(), WsfMilCommTypes::Register(), and WsfMilSensorTypes::Register().
|
inlineoverridevirtual |
Clone an instance of the requested type. The returned instance can either be used as an object of the specified type or a base on which to build a new derived type.
The return pointer will be zero if the requested type is not present.
Implements WsfObjectTypeListBase.
Referenced by WsfEM_AttenuationTypes::Clone(), Target::Create(), Sensor::CreateAndInitialize(), WsfBehaviorTree::CreateNode(), WsfL16::ComputerProcessor::CreatePart(), HorizontalMapFunction::Execute(), WsfExtEmission::GetSensor(), WsfMilExtInterface::GetWeapon(), Tool::Initialize(), WsfEM_XmtrRcvr::Initialize(), WsfESA_AntennaPattern::Initialize(), WsfEW_FalseTargetEffect::FT_Data::Initialize(), WsfGuidedMover::Stage::Initialize(), WsfOTH_RadarSensor::OTH_Beam::Initialize(), WsfRadarSensor::RadarBeam::Initialize(), WsfDisWeaponEvents::InitiateWeaponTransfer(), WsfXIO_AutoDisMapping::NewDisPlatform(), SAM_LaunchComputerGenerator::PlaceNewTarget(), engage::Platform::Platform(), WsfWeaponEngagement::SetWeaponEffects(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inline |
|
inline |
|
inlinestaticprotected |
|
inlineoverridevirtual |
Return the definition of the given type. The return value will be zero if the requested type is not present.
Implements WsfObjectTypeListBase.
Referenced by WsfMilExtInterface::CompleteLoad(), WsfOrbitalEvent::Create(), WsfRoadMover::CreateRoute(), AntennaPlotFunction::Execute(), WsfXIO_PlatformInfoService::FindObjectType(), WsfXIO_WeaponComponent::FindPartType(), WsfArticulatedPart::Initialize(), WsfEW_FalseTargetEffect::FT_Data::Initialize(), WsfZoneAttenuation::Initialize(), WsfZoneReference::Initialize(), XWsfRouteNetwork::Initialize(), wsf::coverage::ZoneBasedGrid::InitializeP(), WsfP6DOF_Mover::InitializeSubobject(), WsfObjectTypeList< SensorErrorModelBase >::IsType(), WsfPlatformAvailability::PlatformIsAvailable(), wsf::coverage::RectangularGrid::PreparePlatforms(), wsf::coverage::ZoneBasedGrid::PreparePlatforms(), WsfMilExtInterface::PrintEmitterTypes(), WsfDisDirectedEnergyFire::Process(), wsf::coverage::CompositeGrid::ProcessInput(), wsf::coverage::Coverage::ProcessInput(), wsf::coverage::Measure::ProcessInput(), wsf::coverage::SimulationExtension::ProcessInput(), wsf::space::AtmosphereSimulationExtension::ProcessInput(), WsfEW_FalseTargetEffect::FT_Data::ProcessInput(), WsfEW_SLB_Effect::ProcessInput(), WsfEW_SLC_Effect::ProcessInput(), WsfIntegratingPropagator::ProcessInput(), WsfOrbitalDynamics::ProcessInput(), WsfPathFinder::ProcessInput(), WsfSpaceMoverBase::ProcessInput(), WsfThermalSystemComponent::ProcessInput(), wsf::AtmosphericTurbulence::SetCN2Form(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), UT_DEFINE_SCRIPT_METHOD(), WsfExtData::WriteEmitterTypes(), and WsfExtData::WriteEntityTypes().
|
inline |
Returns a list of core types, i.e. types added via AddCoreType.
|
inline |
Referenced by wsf::cyber::SimulationExtension::Initialize(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
Returns the list of types defined by the user (no core / builtin types).
Referenced by WsfZoneAttenuation::Initialize(), and wsf::comm::NetworkManager::PlatformsInitialized().
|
inlinevirtual |
Reimplemented in WsfAcousticSignatureTypes, WsfAntennaPatternTypes, WsfChaffParcelTypes, WsfFalseTargetTypes, WsfInfraredSignatureTypes, WsfInherentContrastTypes, WsfMaskingPatternTypes, WsfOpticalReflectivityTypes, WsfOpticalSignatureTypes, WsfRadarSignatureTypes, and WsfWeaponEffectsTypes.
Referenced by WsfObjectTypeList< SensorErrorModelBase >::InitializeTypeP().
|
inlineoverrideprotectedvirtual |
Implements WsfObjectTypeListBase.
|
inline |
|
inline |
|
inlinevirtual |
Load a new 'type object' from an input stream. Process the current command if it is one that defines a new 'type object' of this class.
| aInput | The input stream. |
| UtInput::ExceptionBase | (or derived class) if an error was encountered. |
Reimplemented in WsfAdvancedBehaviorTreeNodeTypes, WsfBehaviorTreeNodeTypes, WsfCallbackTypes, WsfEM_AttenuationTypes, WsfEM_ClutterTypes, WsfEM_PropagationTypes, WsfGroupTypes, WsfPlatformTypes, WsfSensorErrorModelTypes, and WsfZoneTypes.
Referenced by WsfGroupTypes::LoadType(), WsfObjectTypeList< SensorErrorModelBase >::ProcessInput(), and ATA_LaunchComputerGenerator::WriteOutputFile().
|
inline |
|
inline |
|
inlineoverridevirtual |
Implements WsfObjectTypeListBaseI.
Reimplemented in WsfPathFinderTypes, and WsfPlatformTypes.
Referenced by WsfCorrelationStrategyTypes::ProcessInput(), and WsfFusionStrategyTypes::ProcessInput().
|
inline |
|
inline |
Referenced by WsfMilExtension::AddedToScenario().
|
inline |