The overall structure of the DtStateData mechanism is: The DtStateData contains a list of double buffered component data stores (subclasses of DtStateComponent). The double buffered data stores have accessors to the currentFrameState (read only) and the nextFrameState (read/write). The DtStateData class has wrapper class accessors to this nextFrameState (DtExternalNextFrameState) and the currentFrameState (DtExternalCurrentFrameState).
When a new component is added to the state data, the data store for that state component is created and the nextFrameState made available to the DtExternalNextFrameState (as well as being returned by the addStateComponent method). The DtExternalCurrentFrameState will not have access to the current state until the next advanceFrame on the DtStateData is called. Until that point, if called, the DtExternalCurrentFrameState will return a const pointer to the nextFrameState.
The DtStateData class contains all the data for a particular object.
- Related examples
-
|
| | DtStateData () |
| |
| | DtStateData (SimStateID, Legion::SimulationDatabase *, DtStateDataManager *) |
| |
| | DtStateData (SimStateID, makVrf::UInt64, Legion::SimulationDatabase *, DtStateDataManager *) |
| |
| virtual | ~DtStateData () |
| |
| virtual void | invalidate () |
| |
| virtual bool | isValid () const |
| |
| virtual bool | isWritable () const |
| |
| virtual void | clearStateDataManager () |
| |
| virtual void | setAddToSimObjectManager (bool) |
| |
| bool | addToSimObjectManager () const |
| |
| template<typename T_Component > |
| int | getNextFrameNumberOfLegionComponents () |
| |
| template<typename T_Component > |
| int | getCurrentFrameNumberOfLegionComponents () const |
| |
| template<typename T_Component > |
| unsigned int | componentCount () const |
| |
| template<typename T_Component > |
| T_Component | findNextFrameLegionComponent (int index=0) |
| |
| template<typename T_Component > |
| T_Component | findCurrentFrameLegionComponent (int index=0) const |
| |
| virtual void | markModified () |
| |
| virtual void | clearModified () |
| |
| virtual void | removeNextFrameStateComponent (const DtFrameStateInterface *f) |
| |
| virtual void | removeCurrentFrameStateComponent (const DtFrameStateInterface *f) |
| |
| bool | isModified () const |
| |
| bool | advancedFrame () const |
| |
| bool | advancingFrame () const |
| |
| DtExternalNextFrameState * | nextFrameState () |
| |
| const DtExternalCurrentFrameState * | currentFrameState () const |
| |
| virtual DtStateComponent * | createStateComponent (DtStateComponent::StateComponentType t) |
| |
| template<typename T_Component > |
| T_Component * | addStateComponent (bool checkWritable=false, bool isRemote=false) |
| |
| template<typename T_Component > |
| bool | isWritable () |
| |
| void | destroyMainInstance () |
| |
| void | destroyInstance (const Legion::WriteStateInstance &wsi) |
| |
| virtual void | createAndInitializeMainInstance () |
| |
| template<typename T_Component > |
| T_Component | createMainInstance () |
| |
| template<typename T_Component > |
| T_Component | createUnattachedInstance () |
| |
| template<typename T_Component > |
| T_Component | createInstance () |
| |
| template<typename T_Component > |
| DtStateComponent * | getStateComponent (int index=0) |
| |
| template<typename T_Component > |
| const DtStateComponent * | getStateComponent (int index=0) const |
| |
| template<typename T_Component > |
| std::vector< T_Component * > | getNextFrameStateComponentList () const |
| |
| template<typename T_Component > |
| std::vector< const T_Component * > | getCurrentFrameStateComponentList () const |
| |
| template<typename T_Component > |
| bool | hasStateComponent (bool checkWritable=false) |
| |
| template<typename T_Component > |
| const bool | hasStateComponent () const |
| |
| template<typename T_Component > |
| T_Component * | nextFrameStateComponent () |
| |
| template<typename T_Component > |
| const T_Component * | currentFrameStateComponent () const |
| |
virtual const
DtFrameStateInterface * | currentFrameStateFor (const DtFrameStateInterface *) const |
| |
| void | removeComponent (Legion::WriteStateInstance &set) |
| |
| bool | cleared () const |
| |
| bool | frozen () const |
| |
| void | setUserData (unsigned long long) |
| |
| unsigned long long | userData () const |
| |
| const DtUUID & | uuid () const |
| |
| void | setUUID (const DtUUID &) |
| |
| void | setCheckForNameReservation (bool) |
| |
| bool | checkForNameReservation () const |
| |
| void | setGlobalId (const DtString &s) |
| |
| const DtString & | globalId () const |
| |
| void | setMarkingText (const DtString &name) |
| |
| const DtString & | markingText () const |
| |
| void | setAppearance (const DtAppearance &) |
| |
| DtAppearance | appearance () const |
| |
| void | setForceType (DtForceType force) |
| |
| DtForceType | forceType () const |
| |
| const DtString | parentGlobalId () const |
| |
| DtString | parentGlobalId () |
| |
| const DtString & | extendedData (const DtString &key) const |
| |
| const DtString & | nextFrameExtendedData (const DtString &key) const |
| |
| void | setExtendedData (const DtString &key, const DtString &value) |
| |
| const DtUUID & | nextFrameHostId () const |
| |
| const DtUUID & | currentFrameHostId () const |
| |
| bool | isClutterEntity () const |
| |
| void | setEntityType (const DtEntityType &type) |
| |
| void | setObjectType (const DtEntityType &type) |
| |
| DtEntityType | entityType () const |
| |
| DtEntityType | objectType () const |
| |
| void | setEntityId (const DtEntityIdentifier &s) |
| |
| DtEntityIdentifier | entityId () const |
| |
| virtual void | setAwaitingTransfer (bool) |
| |
| bool | awaitingTransfer () const |
| |
| virtual void | initializeParameterData (const DtVrfObjectParameters *) |
| |
| virtual bool | createPublicData (const DtVrfObjectParameters *, bool isReflectedObject, const DtEntityType &et) |
| |
| SimStateID | stateId () const |
| |
| template<typename T_Class > |
| void | removeInstanceUpdatedCallback (Legion::InstanceHandle instanceHandle, unsigned int callbackHandle) |
| |
| template<typename T_Class > |
| unsigned int | addInstanceUpdatedCallback (DtInstanceUpdatedCallback callback, Legion::InstanceHandle instanceHandle, const std::vector< Legion::AttributeIndex > &attributeIndexFilter=std::vector< Legion::AttributeIndex >()) |
| |
| virtual void | advanceFrame () |
| |
| virtual void | takeControlOfComponent (DtStateComponent *) |
| |
| virtual void | setCoordinateSystem (const Coordinate_System *) |
| |
| void | setIsLocal (bool b) |
| |
| bool | isLocal () const |
| |
| PublishFlag | publishFlag () const |
| |
| bool | isPublishedOnNetwork () const |
| |
| DtStateDataManager * | stateDataManager () |
| |
| const DtStateDataManager * | stateDataManager () const |
| |
| double | absRealTime () const |
| |
| const Coordinate_System * | coordinateSystem () const |
| |
| Legion::WriteStateInstance | writeStateInstance () |
| |
| Legion::ReadStateInstance * | readStateInstance () const |
| |
| bool | convertedToLocal () const |
| |
| UInt64 | legionGlobalId () const |
| |
| virtual void | clearComponents () |
| |
| Legion::SimulationDatabase * | database () |
| |
| virtual void | convertToRemote (bool onAdvanceFrame=true) |
| |
| virtual void | convertToLocal () |
| |
| virtual int | indexOfComponent (const DtFrameStateInterface *) const |
| |
| virtual UInt64 | instanceHandle (const DtFrameStateInterface *) const |
| |
| virtual void | shuttingDown () |
| |
| virtual void | deletingComponent (DtStateComponent *) |
| |
| const DtVrfObjectParameters * | parameters () |
| |
| virtual void | aboutToBeDeleted () |
| |
| virtual void | setPublishingOnLegionNetwork (bool b) |
| |
| bool | publishingOnLegionNetwork () const |
| |
virtual const
DtSimulatedObjectStateComponent * | currentFrameSimulatedObjectStateComponent () const |
| |
virtual const
DtLocationStateComponent * | currentFrameLocationStateComponent () const |
| |
|
virtual
DtLaserDesignatorStateComponent * | addLaserDesignator (bool isRemote=false) |
| |
| virtual void | removeLaserDesignator (DtLaserDesignatorStateComponent *) |
| |
virtual
DtTaskVisualizationStateComponent * | lineTaskVisualization (const DtString &visualName, const DtString &component) |
| |
virtual
DtTaskVisualizationStateComponent * | pointTaskVisualization (const DtString &visualName, const DtString &component) |
| |
virtual
DtTaskVisualizationStateComponent * | areaTaskVisualization (const DtString &visualName, const DtString &component) |
| |
virtual
DtTaskVisualizationStateComponent * | textTaskVisualization (const DtString &visualName, const DtString &component) |
| |
| virtual void | removeTaskVisualization (DtTaskVisualizationStateComponent *) |
| |
virtual
DtEmitterSystemStateComponent * | addEmitterSystem (bool isRemote=false) |
| |
| virtual void | removeEmitterSystem (DtEmitterSystemStateComponent *) |
| |
virtual
DtActiveSonarStateComponent * | addActiveSonarSystem (bool isRemote=false) |
| |
| virtual void | removeActiveSonarSystem (DtActiveSonarStateComponent *) |
| |
virtual
DtRadioTransmitterStateComponent * | addRadioTransmitter (bool isRemote=false) |
| |
| virtual void | removeRadioTransmitter (DtRadioTransmitterStateComponent *) |
| |
virtual
DtNavAidRadioTransmitterStateComponent * | addNavAidRadioTransmitter (bool isRemote=false) |
| |
| virtual void | removeNavAidRadioTransmitter (DtNavAidRadioTransmitterStateComponent *) |
| |
virtual
DtRadioReceiverStateComponent * | addRadioReceiver (bool isRemote=false) |
| |
| virtual void | removeRadioReceiver (DtRadioReceiverStateComponent *) |
| |
| virtual DtIffStateComponent * | getOrCreateIffSystem (bool isRemote=false) |
| |
| virtual void | removeIffSystem () |
| |
virtual
DtUnderwaterAcousticsStateComponent * | getOrCreateUnderwaterAcousticsSystem (bool isRemote=false) |
| |
| virtual void | removeUnderwaterAcousticsSystem () |
| |
| virtual void | removeStateComponent (DtFrameStateInterface *) |
| |
|
| static void | addPublicDataFor (const std::string &type, const std::string &componentCreator) |
| |
| static void | removePublicDataFor (const std::string &type, const std::string &componentCreator) |
| |
| static std::set< std::string > | additionalPublicDataFor (DtEntityType defaultEntityType, const std::string &dislpayName, const std::string ¶meterType) |
| |
|
| static void | addDefaultPublicDataFor (const std::string &type, const std::string &componentCreator) |
| |
| static void | removeDefaultPublicDataFor (const std::string &type, const std::string &componentCreator) |
| |
| static std::set< std::string > | defaultPublicDataFor (DtEntityType defaultEntityType, const std::string &dislpayName, const std::string ¶meterType) |
| |
|
| static void | setDefaultMainComponentFor (const std::string &type, const std::string &defaultPublicData) |
| |
| static std::string | defaultMainComponentFor (DtEntityType defaultEntityType, const std::string &dislpayName, const std::string &type) |
| |