|
WSF
|
#include <WsfAltLocComponent.hpp>


Classes | |
| union | Offset |
Public Types | |
| enum | { cCOMPONENT = 20181205 } |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| Public Types inherited from WsfComponentT< WsfPlatform > | |
| typedef WsfPlatform | ParentType |
| This is needed to support the WsfComponentList template. | |
Public Member Functions | |
| Component () | |
| Component (const Component &aSrc) | |
| Component & | operator= (const Component &)=delete |
| ~Component () override=default | |
| Public Member Functions inherited from WsfObject | |
| WsfObject () | |
| This is the constructor for the WsfObject class. | |
| ~WsfObject () override | |
| This is the destructor for the WsfObject class. | |
| const char * | GetScriptClassName () const override |
| const std::string & | GetType () const |
| WsfStringId | GetTypeId () const |
| Get the string ID of the 'type' of the object. | |
| void | SetType (WsfStringId aType) |
| const std::string & | GetBaseType () const |
| WsfStringId | GetBaseTypeId () const |
| const TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (const WsfObject &aRhs) |
| Assignment operator. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| 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 | |
| virtual void | ComponentParentChanged (ParentType *aParentPtr) |
| 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 | Initialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual void | PreInput () |
Static Public Attributes | |
| static constexpr const char * | cNAME = "AlternateLocationsComponent" |
| static constexpr const char * | cCOMMAND = "alternate_locations" |
| static constexpr double | cINVALID_DRAW = -1.0 |
| static constexpr int | cINVALID_LOCATION_INDEX = -1 |
Component infrastructure methods. | |
| BlockType | mBlockType |
| WsfStringId | mReferenceName |
| Component * | mReferenceComponent |
| Offset | mOffset |
| std::vector< WeightedLocation > | mLocations |
| double | mDraw |
| double | mWeightsSum |
| int | mLocationIndex |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| WsfComponent * | CloneComponent () const override |
| void * | QueryInterface (int aRole) override |
| bool | ProcessInput (UtInput &aInput) override |
| WsfObject * | Clone () const override |
| bool | PreInitialize (double aSimTime) override |
| static Component * | Find (const WsfPlatform &aParent) |
| Find the instance of this component attached to the specified platform. | |
| static Component * | FindOrCreate (WsfPlatform &aParent) |
Additional Inherited Members | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
| wsf::altloc::Component::Component | ( | ) |
References mBlockType, mOffset, mReferenceComponent, mReferenceName, and WsfObject::WsfObject().
Referenced by Clone(), CloneComponent(), Component(), Find(), FindOrCreate(), operator=(), PreInitialize(), ProcessInput(), and ~Component().
| wsf::altloc::Component::Component | ( | const Component & | aSrc | ) |
References Component(), mBlockType, mDraw, mLocationIndex, mLocations, mOffset, mReferenceComponent, mReferenceName, mWeightsSum, and WsfObject::WsfObject().
|
overridedefault |
References Component(), and WsfObject::WsfObject().
|
overridevirtual |
Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.
Implements WsfObject.
References Component(), and WsfObject::WsfObject().
|
overridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
References Component().
|
static |
Find the instance of this component attached to the specified platform.
References Component(), WsfComponentList::FindByRole(), and WsfPlatform::GetComponents().
Referenced by FindOrCreate().
|
static |
Find the instance of this component attached to the specified platform, and create it if it doesn't exist.
References Component(), Find(), and WsfPlatform::GetComponents().
|
overridevirtual |
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 WsfObject::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 cCOMPONENT, and cWSF_COMPONENT_NULL.
References Component().
|
overridevirtual |
Perform pre-initializion function. This is called by WsfPlatform::Initialize prior to actually initializing the components on a platform (i.e.: calling Initialize and Initialize2 for each component). The primary reason for this method is to allow components to add other components that will then be subsequently initialized. The component may examine the component list and add components, but it must not assume ANYTHING about the actual state of the component.
| aSimTime | The current simulation time. |
Reimplemented from WsfComponent.
References wsf::altloc::AGL, wsf::altloc::WeightedLocation::alt, wsf::altloc::WeightedLocation::altRef, wsf::altloc::WeightedLocation::altSet, cINVALID_LOCATION_INDEX, Component(), WsfObserver::Event(), wsf::altloc::SimulationExtension::Get(), WsfComponentT< WsfPlatform >::GetComponentParent(), wsf::Terrain::GetElevInterp(), WsfObject::GetName(), WsfSimulation::GetPlatformByName(), WsfPlatform::GetSimulation(), WsfSimulation::GetTerrainInterface(), wsf::altloc::WeightedLocation::hed, wsf::altloc::WeightedLocation::hedSet, wsf::altloc::WeightedLocation::lat, wsf::altloc::LOCAL, wsf::altloc::WeightedLocation::lon, mBlockType, mDraw, mLocationIndex, mLocations, mOffset, mReferenceComponent, mReferenceName, wsf::altloc::MSL, wsf::altloc::NONE, wsf::altloc::OFF_ARA, wsf::altloc::OFF_LLA, wsf::altloc::REF_LOC, and wsf::altloc::WeightedLocation::weight.
|
overridevirtual |
Process input from a generic source.
Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
References cCOMMAND, cNAME, Component(), WsfComponentListT< COMPONENT_TYPE >::FindComponent(), WsfScenario::FromInput(), WsfScenario::GetDeferredInput(), WsfScenario::GetInputPlatformByName(), wsf::altloc::LOCAL, mBlockType, mLocations, mOffset, mReferenceName, mWeightsSum, wsf::altloc::NONE, wsf::altloc::OFF_ARA, wsf::altloc::OFF_LLA, platformPtr, wsf::altloc::REF_LOC, and WsfDeferredInput::Requires().
|
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 cCOMPONENT.
|
staticconstexpr |
Referenced by ProcessInput().
|
staticconstexpr |
Referenced by wsf::altloc::SimulationExtension::GetDraw().
|
staticconstexpr |
Referenced by PreInitialize().
|
staticconstexpr |
Referenced by ProcessInput().
| BlockType wsf::altloc::Component::mBlockType |
Referenced by Component(), Component(), PreInitialize(), and ProcessInput().
| double wsf::altloc::Component::mDraw |
Referenced by Component(), and PreInitialize().
| int wsf::altloc::Component::mLocationIndex |
Referenced by Component(), and PreInitialize().
| std::vector<WeightedLocation> wsf::altloc::Component::mLocations |
Referenced by Component(), PreInitialize(), and ProcessInput().
| Offset wsf::altloc::Component::mOffset |
Referenced by Component(), Component(), PreInitialize(), and ProcessInput().
| Component* wsf::altloc::Component::mReferenceComponent |
Referenced by Component(), Component(), and PreInitialize().
| WsfStringId wsf::altloc::Component::mReferenceName |
Referenced by Component(), Component(), PreInitialize(), and ProcessInput().
| double wsf::altloc::Component::mWeightsSum |
Referenced by Component(), and ProcessInput().