|
WSF
|
#include <WsfCallback.hpp>


Public Member Functions | |
| WsfCallback () | |
| ~WsfCallback () override | |
| 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 | PreInitialize (double aSimTime) |
| virtual bool | Initialize (double aSimTime) |
| virtual bool | Initialize2 (double aSimTime) |
| virtual void | PreInput () |
Component infrastructure methods | |
| WsfComponent * | CloneComponent () const override |
| WsfStringId | GetComponentName () const override |
| const int * | GetComponentRoles () const override |
| void * | QueryInterface (int aRole) override |
| WsfCallback * | Clone () const override=0 |
| virtual bool | Execute (double aSimTime, WsfPlatform *aPlatformPtr)=0 |
| bool | ProcessInput (UtInput &aInput) override |
| static bool | ExecuteAndNotify (double aSimTime, WsfPlatform *aPlatformPtr, WsfStringId aCallbackName) |
| WsfCallback (const WsfCallback &aSrc) | |
Additional Inherited Members | |
| 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. | |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
WsfCallback provides the functionality to create callbacks that execute within the context of a platform or one of its processors.
This functionality was created prior the existence of the scripting language and is now to be considered deprecated. The only known use is by the air_traffic extension (XWsfAirTraffic).
| WsfCallback::WsfCallback | ( | ) |
References WsfObject::WsfObject().
Referenced by Clone(), WsfScriptCallback::Clone(), XWsfAirTraffic::UpdateFlightStatusCallback::Clone(), ExecuteAndNotify(), WsfScriptCallback::operator=(), XWsfAirTraffic::UpdateFlightStatusCallback::UpdateFlightStatusCallback(), WsfCallback(), and WsfScriptCallback::WsfScriptCallback().
|
override |
|
protected |
References WsfCallback(), and WsfObject::WsfObject().
|
overridepure virtual |
Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.
Implements WsfObject.
Implemented in WsfScriptCallback, and XWsfAirTraffic::UpdateFlightStatusCallback.
References WsfCallback().
Referenced by wsf::six_dof::Mover::ExecuteTriggers(), and WsfP6DOF_Mover::ExecuteTriggers().
|
inlineoverridevirtual |
Clones a component. May return null if component does not support clone.
Implements WsfComponent.
References WsfObject::Clone().
|
pure virtual |
Implemented in WsfScriptCallback, and XWsfAirTraffic::UpdateFlightStatusCallback.
Referenced by ExecuteAndNotify(), wsf::six_dof::Mover::ExecuteTriggers(), and WsfP6DOF_Mover::ExecuteTriggers().
|
static |
Primary entry for invoking a callback from other simulation components. This is what is called when another simulation wants to trigger the callback. This routine invokes the Execute method and also invokes things like simulation observers.
| aSimTime | The current simulation time. |
| aPlatformPtr | The platform executing the callback |
| aCallbackName | The name of the callback to execute |
References WsfComponentList::RoleIterator< T >::AtEnd(), Execute(), WsfObserver::ExecuteCallback(), WsfComponentList::GetComponent(), WsfObject::GetName(), WsfPlatform::GetSimulation(), and WsfCallback().
Referenced by wsf::six_dof::Mover::ExecuteTriggers(), and WsfP6DOF_Mover::ExecuteTriggers().
|
inlineoverridevirtual |
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 cWSF_COMPONENT_CALLBACK.
|
inlineoverridevirtual |
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.
Reimplemented in WsfScriptCallback.
|
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 cWSF_COMPONENT_CALLBACK.