![]() |
VR-Forces 5.0.3 Developer's Guide
|
The DtObjectDataInterface class is a wrapper around state views to give access to convenience methods which will allow developers to more easily access data about those objects. It will also provide some basic manipulation for that object. Instances of this class and its subclasses, are returned by the DtVrfStateViewCollectionManager.
The DtObjectDataInterface class is a base class that is inherited by subclasses to provide their specific data content. The type() method will return the type of class, and, using that information you can dynamically cast to the appropriate class:

Public Types | |
| enum | Representation { Local = 0, World = 1 } |
Public Member Functions | |
| DtObjectDataInterface (makVrv::DtDe &) | |
| virtual | ~DtObjectDataInterface () |
| makVrv::DtElementID | elementID () const |
| virtual makVrv::DtElementEntry::ElementType | type () const |
| virtual makVrv::DtSimEntryUpdater::UpdateRate | setUpdateRate (makVrv::DtSimEntryUpdater::UpdateRate) |
| virtual void | setStateView (const makVrv::DtStateView< makVrv::DtSimState > *s) |
| makVrv::DtSimEntryUpdater::UpdateRate | updateRate () const |
| virtual void | forceUpdate () |
| virtual bool | isValid () const |
| virtual bool | hasBeenRemoved () const |
| virtual bool | isVisible () const |
| virtual void | setVisible (bool) |
| virtual bool | isSelected () const |
| virtual void | removeFromSelection () |
| virtual void | addToSelection (bool replace=false) |
Static Public Member Functions | |
| template<typename T_ObjectDataInterfaceType > | |
| static DtBoost::shared_ptr < T_ObjectDataInterfaceType > | cast (DtBoost::shared_ptr< DtObjectDataInterface > dataInterface) |
Public Attributes | |
| boost::signals2::signal< void()> | signal_dataUpdated |
| boost::signals2::signal< void()> | signal_dataRemoved |
Protected Member Functions | |
| virtual void | slot_simObjectEntryAboutToBeRemoved (makVrv::DtSimObjectEntry &) |
| virtual DtVector | geocentricVectorToLocalVector (const DtVector &localLocation, const DtVector &geocVector) const |
| virtual void | slot_onStateViewUpdated () |
Protected Attributes | |
| makVrv::DtDe & | myDe |
| makVrv::DtStateView < makVrv::DtSimState > * | myStateView |
| makVrf::DtObjectDataInterface::DtObjectDataInterface | ( | makVrv::DtDe & | ) |
|
virtual |
| makVrv::DtElementID makVrf::DtObjectDataInterface::elementID | ( | ) | const |
Returns the element id of this object. If returns 0 the object has been removed from the simulation.
|
virtual |
Returns the type of this object. Used for dynamic casting to proper sub-class.
Reimplemented in makVrf::DtEntityDataInterface, makVrf::DtAggregateDataInterface, makVrf::DtTacticalGraphicDataInterface, makVrf::DtSpotReportDataInterface, makVrf::DtOrbatDataInterface, and makVrf::DtVrfTDLMessageDataInterface.
|
inlinestatic |
This is a convenience method for casting a DtBoost::shared_ptr to a DtObjectDataInterface to a derived class.
|
virtual |
Sets the update rate for the data contained in this data interface. The update rate is the rate at which data from the network thread gets posted to the GUI thread. The current update rate is returned. Note that when this object is deleted the update rate will not be restored to the original rate. Any increase or decrease in rate will be maintained for this data until the next change.
|
virtual |
Sets the base level state view of this object.
Reimplemented in makVrf::DtVrfVrlinkDataInterface, makVrf::DtSpotReportDataInterface, makVrf::DtOrbatDataInterface, makVrf::DtVrfTDLMessageDataInterface, makVrf::DtEntityDataInterface, makVrf::DtAggregateDataInterface, and makVrf::DtTacticalGraphicDataInterface.
| makVrv::DtSimEntryUpdater::UpdateRate makVrf::DtObjectDataInterface::updateRate | ( | ) | const |
Returns the current update rate.
|
virtual |
Forces an update of the data so on the next tick the network thread will update data in the gui thread.
|
virtual |
Returns true if this is a valid data interface.
|
virtual |
Returns true if this item has been removed from the simulation.
|
virtual |
Returns true if the item is visible.
|
virtual |
Sets the item to visible or invisible. If setting to be invisible and the item is selected, will be removed from the current selection. If set to visible will not be restored to selection. Call addToSelection to restore to selection.
|
virtual |
Returns true if the item is selected.
|
virtual |
Removes the item from the current selection.
|
virtual |
Adds the item to the current selection. If replace is true will replace the current selection and leave only the item.
|
protectedvirtual |
Slot that is called when the state view is destroyed. Will mark this item as removed by clearing out internal pointers.
Reimplemented in makVrf::DtVrfVrlinkDataInterface, makVrf::DtEntityDataInterface, makVrf::DtTacticalGraphicDataInterface, makVrf::DtSpotReportDataInterface, makVrf::DtAggregateDataInterface, makVrf::DtOrbatDataInterface, and makVrf::DtVrfTDLMessageDataInterface.
|
protectedvirtual |
Converts a geocentric vector to a local vector, given the local location.
|
protectedvirtual |
Called when any of the state views data has been updated. Sends out signal_dataUpdated.
Reimplemented in makVrf::DtVrfVrlinkDataInterface.
| boost::signals2::signal<void ()> makVrf::DtObjectDataInterface::signal_dataUpdated |
Signal sent when any of this items data has been updated.
| boost::signals2::signal<void ()> makVrf::DtObjectDataInterface::signal_dataRemoved |
Signal send when this items data has been removed.
|
protected |
|
protected |