VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends
makVrf::DtStateData Class Reference

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

Public Types

enum  PublishFlag { DoNotPublish, PublishAll, PublishComponentsOnly }
 
using SimStateID = unsigned long long
 

Public Member Functions

 DtStateData ()
 
 DtStateData (SimStateID id, Legion::SimulationDatabase *db, DtStateDataManager *mgr)
 
 DtStateData (SimStateID id, makVrf::UInt64 legionHandle, Legion::SimulationDatabase *db, DtStateDataManager *mgr)
 
virtual ~DtStateData ()
 
virtual void invalidate ()
 
virtual bool checkValidity () const
 
virtual bool isWritable () const
 
virtual void clearStateDataManager ()
 
virtual void setAddToSimObjectManager (bool b)
 
bool addToSimObjectManager () const
 
template<typename T_Component >
int getNextFrameNumberOfLegionComponents ()
 
template<typename T_Component >
int getCurrentFrameNumberOfLegionComponents () const
 
bool ownsComponents () 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 value)
 
unsigned long long userData () const
 
const DtUUID & uuid () const
 
void setUUID (const DtUUID &u)
 
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 setSidc (const DtString &)
 
const DtString & sidc () const
 
void setAppearance (const DtAppearance &a)
 
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)
 
const DtEntityIdentifier & entityId () const
 
virtual void setAwaitingTransfer (bool b)
 
bool awaitingTransfer () const
 
virtual void initializeParameterData (const DtVrfObjectParameters *params)
 
virtual bool createPublicData (const DtVrfObjectParameters *params, 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 *cs)
 
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 *comp)
 
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 *comp)
 
virtual
DtEmitterSystemStateComponent * 
addEmitterSystem (bool isRemote=false)
 
virtual void removeEmitterSystem (DtEmitterSystemStateComponent *comp)
 
virtual
DtActiveSonarStateComponent * 
addActiveSonarSystem (bool isRemote=false)
 
virtual void removeActiveSonarSystem (DtActiveSonarStateComponent *comp)
 
virtual
DtRadioTransmitterStateComponent * 
addRadioTransmitter (bool isRemote=false)
 
virtual void removeRadioTransmitter (DtRadioTransmitterStateComponent *comp)
 
virtual
DtNavAidRadioTransmitterStateComponent * 
addNavAidRadioTransmitter (bool isRemote=false)
 
virtual void removeNavAidRadioTransmitter (DtNavAidRadioTransmitterStateComponent *comp)
 
virtual
DtRadioReceiverStateComponent * 
addRadioReceiver (bool isRemote=false)
 
virtual void removeRadioReceiver (DtRadioReceiverStateComponent *comp)
 
virtual DtIffStateComponent * getOrCreateIffSystem (bool isRemote=false)
 
virtual void removeIffSystem ()
 
virtual
DtUnderwaterAcousticsStateComponent * 
getOrCreateUnderwaterAcousticsSystem (bool isRemote=false)
 
virtual void removeUnderwaterAcousticsSystem ()
 
virtual void removeStateComponent (DtFrameStateInterface *comp)
 

Static Public Member Functions

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 &parameterType)
 
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 &parameterType)
 
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)
 

Public Attributes

boost::signals2::signal< void(const
DtStateData *)> 
signal_firstFrameAdvance
 
boost::signals2::signal< void(const
DtUUID &, const DtUUID
&, SimStateID)> 
signal_uuidChanged
 
boost::signals2::signal< void(const
DtString &, const DtString
&, const DtUUID &, SimStateID)> 
signal_markingTextChanged
 
boost::signals2::signal< void(const
DtStateData *, const DtUUID
&oldUUID, const DtUUID
&newUUID)> 
signal_hostChanged
 
boost::signals2::signal< void(const
DtStateData *)> 
signal_stateDataToBeDestroyed
 
boost::signals2::signal< void(SimStateID)> signal_preFrameAdvanced
 
boost::signals2::signal< void(const
DtStateData *)> 
signal_frameAdvanced
 
boost::signals2::signal< void(const
DtStateData *)> 
signal_modified
 
boost::signals2::signal< void(DtStateData *)> signal_convertingToRemote
 
boost::signals2::signal< void(DtStateData *)> signal_convertedToRemote
 
boost::signals2::signal< void(DtStateData *)> signal_convertingToLocal
 
boost::signals2::signal< void(DtStateData *)> signal_convertedToLocal
 
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentAdded
 
boost::signals2::signal< void(DtStateComponent *)> signal_stateComponentRemoved
 
boost::signals2::signal< void(const
DtStateData *, const
std::vector< DtUUID > &added,
const std::vector< DtUUID >
&removed)> 
signal_subordinatesChanged
 

Protected Types

typedef std::map< std::string,
std::set< std::string > > 
PublicData
 
typedef std::map< std::string,
std::string > 
DefaultMainComponentMap
 

Protected Member Functions

virtual
DtSimulatedObjectStateComponent * 
nextFrameSimulatedObjectStateComponent ()
 
virtual DtStateData * currentFrameHostStateData () const
 
virtual bool createMainData (const DtVrfObjectParameters *params, const DtEntityType &et)
 
virtual void hostChanged (const DtUUID &oldUUID, const DtUUID &newUUID)
 
virtual void setupStateComponent (DtStateComponent *comp, const DtVrfObjectParameters *params=nullptr)
 
virtual void subordinatesChanged (const std::vector< DtUUID > &oldSubordinates, const std::vector< DtUUID > &newSubordinates)
 
void setPublishFlag (PublishFlag b)
 
virtual std::string defaultParameterTypeForEntityType (const DtEntityType &et) const
 
virtual void completeRemoteConversion ()
 
virtual void hostWasDeleted ()
 
virtual void removeStateComponent (DtStateComponent::StateComponentType t)
 
virtual void uuidChanged (const DtUUID &oldUUID, const DtUUID &newUUID)
 
virtual void markingTextChanged (const DtString &oldText, const DtString &newText)
 

Protected Attributes

DtExternalNextFrameState myNextFrameState
 
DtExternalCurrentFrameState myCurrentFrameState
 
DtStateDataManager * myStateDataManager
 
Legion::SimulationDatabase * myDatabase
 
Legion::WriteStateInstance myWriteStateInstance
 
Legion::ReadStateInstance * myReadStateInstance
 
SimStateID mySimStateID
 
bool myIsModified = true
 
PublishFlag myPublishFlag
 
const Coordinate_System * myCoordinateSystem
 
int mySessionId
 
std::vector< std::vector
< DtStateComponent * > > 
myStateComponents
 
std::vector< std::vector
< DtStateComponent * > > 
myCreatedStateComponents
 
std::set< DtFrameStateInterface * > myRemoveStateComponents
 
bool myAdvancedFrame
 
bool myConvertToRemote
 
bool myAwaitingTransfer
 
UInt64 myLegionGlobalId
 
std::atomic< unsigned int > myComponentNumber
 
boost::signals2::scoped_connection mySubordinatesChangedConnection
 
boost::signals2::scoped_connection myHostChangedConnection
 
boost::signals2::scoped_connection myUUIDChangedConnection
 
boost::signals2::scoped_connection myMarkingTextChangedConnection
 
boost::signals2::scoped_connection myHostWasDeletedConnection
 
bool myCleared
 
const DtVrfObjectParameters * myParameters
 
bool myPublishingOnLegionNetwork
 
bool myMainComponentOnLegion
 
const
DtSimulatedObjectStateComponent * 
myCurrentFrameSimulatedObjectStateComponent
 
const DtLocationStateComponent * myCurrentFrameLocationStateComponent
 
const DtLocationStateComponent * myNextFrameLocationStateComponent = nullptr
 
DtSimulatedObjectStateComponent * myNextFrameSimulatedObjectStateComponent
 
DtStateData * myCurrentFrameHostStateData
 
tbb::spin_rw_mutex myCurrentFrameHostStateDataMutex
 
bool myAdvancingFrame = false
 
bool myConvertedToLocal = false
 
bool myAddToSimObjectManager = true
 
bool myOwnsComponents = false
 
DtString myMarkingText
 
DtEntityType myEntityType
 

Static Protected Attributes

static PublicData theDefaultPublicData
 
static PublicData theAdditionalPublicData
 
static DefaultMainComponentMap theDefaultMainComponentMap
 
static tbb::mutex theCreateInstanceMutex
 

Friends

class DtStateDataManager
 
class DtExternalNextFrameState
 

Member Typedef Documentation

Opaque integer type used to identify and index state data objects.

typedef std::map<std::string, std::set<std::string> > makVrf::DtStateData::PublicData
protected

This is added for systems that might not have updated the ope files to the new format to get public data for a parameter type. The system will add the basic public data needed by parameter type from the DtStateDataManager to use as a default.

typedef std::map<std::string, std::string> makVrf::DtStateData::DefaultMainComponentMap
protected

Maps parameter / entity type strings to the name of their default main component creator.

Member Enumeration Documentation

Controls whether and how this object's state is published on the Legion network.

Enumerator
DoNotPublish 

State is not published.

PublishAll 

All state is published.

PublishComponentsOnly 

Only individual components are published, not the main instance.

Constructor & Destructor Documentation

makVrf::DtStateData::DtStateData ( )

CTOR.

The basic DtStateData constructor will only allow the setting of a few basic items of data – components cannot be added nor will this be double buffered or added to the sim object manager. Use if you only want to quickly create state data and set some very basic information to be used in a DtSimObjectReference

makVrf::DtStateData::DtStateData ( SimStateID  id,
Legion::SimulationDatabase *  db,
DtStateDataManager *  mgr 
)

Constructs a managed DtStateData with a simulation database and state data manager.

Parameters
idThe unique simulation state ID for this object.
dbThe Legion simulation database.
mgrThe state data manager that owns this object.
makVrf::DtStateData::DtStateData ( SimStateID  id,
makVrf::UInt64  legionHandle,
Legion::SimulationDatabase *  db,
DtStateDataManager *  mgr 
)

Constructs a managed DtStateData initialized from an existing Legion global ID.

Parameters
idThe unique simulation state ID for this object.
legionHandleThe Legion global ID of an existing remote object.
dbThe Legion simulation database.
mgrThe state data manager that owns this object.
virtual makVrf::DtStateData::~DtStateData ( )
virtual

Destroys this state data object; fires the signal_stateDataToBeDestroyed signal and cleans up all registered state components.

Member Function Documentation

virtual void makVrf::DtStateData::invalidate ( )
virtual

Sets the fact that the user cannot use any of the components as they might cause a crash when referenced.

virtual bool makVrf::DtStateData::checkValidity ( ) const
virtual

Checks whether this state data is still in a usable state. Do not call this method directly if wrapped in a DtSimObjectReference. Always use the DtSimObjectReference isValid call (ref.isValid())

virtual bool makVrf::DtStateData::isWritable ( ) const
virtual
Returns
True if the next-frame state of this object is writable (i.e. the object is local).
virtual void makVrf::DtStateData::clearStateDataManager ( )
virtual

Clears the pointer to the owning state data manager without notifying it (used during shutdown).

virtual void makVrf::DtStateData::setAddToSimObjectManager ( bool  b)
virtual

Sets whether this state data should be registered with the sim object manager when created.

Parameters
bTrue to register with the sim object manager (default), false to skip registration.
bool makVrf::DtStateData::addToSimObjectManager ( ) const
inline
Returns
True if this state data should be added to the sim object manager.
template<typename T_Component >
int makVrf::DtStateData::getNextFrameNumberOfLegionComponents ( )
inline

Returns the count of Legion extension components of the given type for the next frame. Falls back to the current frame count if no writable instance exists.

Template Parameters
T_ComponentThe Legion component type.
Returns
Number of extension components, or 0 if not available.
template<typename T_Component >
int makVrf::DtStateData::getCurrentFrameNumberOfLegionComponents ( ) const
inline

Returns the count of Legion extension components of the given type for the current frame.

Template Parameters
T_ComponentThe Legion component type.
Returns
Number of extension components, or 0 if the read instance is not valid.
bool makVrf::DtStateData::ownsComponents ( ) const
inline
template<typename T_Component >
unsigned int makVrf::DtStateData::componentCount ( ) const
inline

Returns the total count of Legion extension components of the given type across next and current frames. Prefers the write instance if valid, then the read instance.

Template Parameters
T_ComponentThe Legion component type.
Returns
Number of extension components, or 0 if neither instance is valid.

Referenced by makVrf::DtRemoteObjectManager::StateComponentAdder< T_VRFStateComponent, T_LegionComponent >::addStateComponent().

template<typename T_Component >
T_Component makVrf::DtStateData::findNextFrameLegionComponent ( int  index = 0)
inline

Finds and returns a writable Legion extension component of the given type for the next frame. Falls back to the current frame if no writable instance exists.

Template Parameters
T_ComponentThe Legion component type.
Parameters
indexZero-based index of the extension component.
Returns
The Legion component, or a default-constructed instance if not found.

Referenced by makVrf::DtRemoteObjectManager::StateComponentAdder< T_VRFStateComponent, T_LegionComponent >::hasStateComponent().

template<typename T_Component >
T_Component makVrf::DtStateData::findCurrentFrameLegionComponent ( int  index = 0) const
inline

Finds and returns a read-only Legion extension component of the given type for the current frame.

Template Parameters
T_ComponentThe Legion component type.
Parameters
indexZero-based index of the extension component.
Returns
The Legion component, or a default-constructed instance if not found.
virtual void makVrf::DtStateData::markModified ( )
virtual

Marks this state data as modified so it will be processed during the next frame advance.

virtual void makVrf::DtStateData::clearModified ( )
virtual

Clears the modified flag on this state data.

virtual void makVrf::DtStateData::removeNextFrameStateComponent ( const DtFrameStateInterface *  f)
virtual

Queues the removal of the given next-frame state component to take effect on the next frame advance.

Parameters
fThe frame state interface to remove.
virtual void makVrf::DtStateData::removeCurrentFrameStateComponent ( const DtFrameStateInterface *  f)
virtual

Immediately removes a current-frame state component.

Parameters
fThe frame state interface to remove.
bool makVrf::DtStateData::isModified ( ) const
Returns
True if this state data or any of its next-frame components have been modified.
bool makVrf::DtStateData::advancedFrame ( ) const
inline
Returns
True if advanceFrame() has been called at least once for this state data.
bool makVrf::DtStateData::advancingFrame ( ) const
inline
Returns
True if advanceFrame() is currently executing.
DtExternalNextFrameState* makVrf::DtStateData::nextFrameState ( )
inline
Returns
Pointer to the writable next-frame state view.
const DtExternalCurrentFrameState* makVrf::DtStateData::currentFrameState ( ) const
inline
Returns
Const pointer to the read-only current-frame state view.
virtual DtStateComponent* makVrf::DtStateData::createStateComponent ( DtStateComponent::StateComponentType  t)
virtual

Creates a new state component of the given type and registers it with this state data.

Parameters
tThe state component type to create.
Returns
Pointer to the newly created state component.
template<typename T_Component >
T_Component* makVrf::DtStateData::addStateComponent ( bool  checkWritable = false,
bool  isRemote = false 
)
inline

Using the global state component factory, creates and adds a new state of the given type.

Referenced by makVrf::DtRemoteObjectManager::StateComponentAdder< T_VRFStateComponent, T_LegionComponent >::addStateComponent().

template<typename T_Component >
bool makVrf::DtStateData::isWritable ( )
inline
Returns
True if the next-frame state component of the given type is writable.
Template Parameters
T_ComponentThe state component type to check.
void makVrf::DtStateData::destroyMainInstance ( )
inline

Destroys the main Legion write instance and frees the associated read instance.

void makVrf::DtStateData::destroyInstance ( const Legion::WriteStateInstance &  wsi)
inline

Destroys a Legion instance and removes it from the simulation database.

Parameters
wsiThe write-state instance to destroy.
virtual void makVrf::DtStateData::createAndInitializeMainInstance ( )
virtual

If not valid, creates and initializes a new write state instance.

template<typename T_Component >
T_Component makVrf::DtStateData::createMainInstance ( )
inline

Creates a new main Legion write instance of the given type and stores it as the primary instance.

Template Parameters
T_ComponentThe Legion component type to create.
Returns
A handle to the newly created component.
template<typename T_Component >
T_Component makVrf::DtStateData::createUnattachedInstance ( )
inline

Creates a new Legion instance of the given type without attaching it as an extension to the main instance. Throws DtUnknownStateComponent if no writable main instance exists.

Template Parameters
T_ComponentThe Legion component type to create.
Returns
A handle to the newly created component, or a default instance if the database is null.
template<typename T_Component >
T_Component makVrf::DtStateData::createInstance ( )
inline

Creates a new Legion extension component of the given type and attaches it to the main write instance. Throws DtUnknownStateComponent if no writable main instance exists.

Template Parameters
T_ComponentThe Legion component type to create.
Returns
A handle to the newly created component, or a default instance if the database is null. Creates a new Legion extension component of the given type and attaches it to the main write instance. Throws DtUnknownStateComponent if no writable main instance exists.
Template Parameters
T_ComponentThe Legion component type to create.
Returns
A handle to the newly created component, or a default instance if the database is null.
template<typename T_Component >
DtStateComponent* makVrf::DtStateData::getStateComponent ( int  index = 0)
inline

Returns a writable pointer to the internal DtStateComponent of the given type at the specified index.

Template Parameters
T_ComponentThe state component type.
Parameters
indexZero-based index.
Returns
Pointer to the component, or nullptr if not found.

Referenced by DtLocalObject::addStateComponent().

template<typename T_Component >
const DtStateComponent* makVrf::DtStateData::getStateComponent ( int  index = 0) const
inline

Returns a const pointer to the internal DtStateComponent of the given type at the specified index.

Template Parameters
T_ComponentThe state component type.
Parameters
indexZero-based index.
Returns
Const pointer to the component, or nullptr if not found.
template<typename T_Component >
std::vector<T_Component*> makVrf::DtStateData::getNextFrameStateComponentList ( ) const
inline
Returns
All writable next-frame state components of the given type.
Template Parameters
T_ComponentThe state component type to retrieve.
template<typename T_Component >
std::vector<const T_Component*> makVrf::DtStateData::getCurrentFrameStateComponentList ( ) const
inline
Returns
All read-only current-frame state components of the given type.
Template Parameters
T_ComponentThe state component type to retrieve.
template<typename T_Component >
bool makVrf::DtStateData::hasStateComponent ( bool  checkWritable = false)
inline

Returns true if a state component of the given type exists on this object. First checks the next frame, then falls back to the current frame.

Template Parameters
T_ComponentThe state component type to check for.
Parameters
checkWritableIf true, also verifies that the next-frame component is writable.
Returns
True if the component is found (and writable, if checkWritable is set).

Referenced by makVrf::DtRemoteObjectManager::StateComponentAdder< T_VRFStateComponent, T_LegionComponent >::addStateComponent().

template<typename T_Component >
const bool makVrf::DtStateData::hasStateComponent ( ) const
inline

Returns true if the current-frame contains a state component of the given type that can be cast to it.

Template Parameters
T_ComponentThe state component type to check for.
Returns
True if the current-frame component exists and the cast succeeds.
template<typename T_Component >
T_Component* makVrf::DtStateData::nextFrameStateComponent ( )
inline

Returns a writable pointer to the next-frame state component of the given type. Throws DtUnknownStateComponent if the component is not writable.

Template Parameters
T_ComponentThe state component type to retrieve.
Returns
Writable pointer to the component.
template<typename T_Component >
const T_Component* makVrf::DtStateData::currentFrameStateComponent ( ) const
inline

Returns a const pointer to the current-frame state component of the given type.

Template Parameters
T_ComponentThe state component type to retrieve.
Returns
Const pointer to the component at index 0, or nullptr if not found.
virtual const DtFrameStateInterface* makVrf::DtStateData::currentFrameStateFor ( const DtFrameStateInterface *  ) const
virtual

If this is double buffered, return the current frame state component for this inteface. If this is already the current frame will return itself.

void makVrf::DtStateData::removeComponent ( Legion::WriteStateInstance &  set)

Removes a Legion extension component from the main write instance and destroys it.

Parameters
setThe write-state instance representing the component to remove.
bool makVrf::DtStateData::cleared ( ) const
inline
Returns
True if aboutToBeDeleted() has been called and this object's state has been cleared.
bool makVrf::DtStateData::frozen ( ) const

Retuns true if the location component is frozen.

void makVrf::DtStateData::setUserData ( unsigned long long  value)

Sets a 64-bit user-defined data value on the simulated object state component.

Parameters
valueThe value to store.
unsigned long long makVrf::DtStateData::userData ( ) const
Returns
The user-defined 64-bit data value stored on the simulated object state component.
const DtUUID& makVrf::DtStateData::uuid ( ) const
Returns
The UUID of this state data object.

Referenced by makVrf::DtSimObjectManagerTemplate< T_BaseClass >::DeletedObjects::track().

void makVrf::DtStateData::setUUID ( const DtUUID &  u)

Sets the UUID of this state data object.

Parameters
uThe new UUID.
void makVrf::DtStateData::setCheckForNameReservation ( bool  )

VR-Link specific set used for HLA and name reservation. If this flag is set to false (default true) before the publisher is created then the name reservation code will not be checked.

bool makVrf::DtStateData::checkForNameReservation ( ) const
Returns
True if name reservation should be checked (default true).
void makVrf::DtStateData::setGlobalId ( const DtString &  s)

Sets the global ID (marking text key) of this entity.

Parameters
sThe new global ID string.
const DtString& makVrf::DtStateData::globalId ( ) const
Returns
The global ID of this entity.
void makVrf::DtStateData::setMarkingText ( const DtString &  name)

Sets the marking text (human-readable name) for this entity.

Parameters
nameThe new marking text.
const DtString& makVrf::DtStateData::markingText ( ) const
Returns
The current marking text of this entity.
void makVrf::DtStateData::setSidc ( const DtString &  )

Sets the Sidc (SymbolId) for this object.

const DtString& makVrf::DtStateData::sidc ( ) const
void makVrf::DtStateData::setAppearance ( const DtAppearance &  a)

Sets the visual appearance bits of this entity.

Parameters
aThe appearance to apply.
DtAppearance makVrf::DtStateData::appearance ( ) const
Returns
The current appearance of this entity constructed from its entity type and appearance bits.
void makVrf::DtStateData::setForceType ( DtForceType  force)

Sets the force affiliation of this entity.

Parameters
forceThe force type (e.g. friendly, hostile).
DtForceType makVrf::DtStateData::forceType ( ) const
Returns
The force affiliation of this entity.
const DtString makVrf::DtStateData::parentGlobalId ( ) const
Returns
The global ID of the parent entity, or an empty string if there is none (const overload).
DtString makVrf::DtStateData::parentGlobalId ( )
Returns
The global ID of the parent entity, or an empty string if there is none.
const DtString& makVrf::DtStateData::extendedData ( const DtString &  key) const
Returns
The current-frame value of the named extended data field, or a null string if not found.
Parameters
keyThe name of the extended data field.
const DtString& makVrf::DtStateData::nextFrameExtendedData ( const DtString &  key) const
Returns
The next-frame value of the named extended data field, or a null string if not found.
Parameters
keyThe name of the extended data field.
void makVrf::DtStateData::setExtendedData ( const DtString &  key,
const DtString &  value 
)

Sets the value of the named extended data field on the next frame.

Parameters
keyThe name of the extended data field.
valueThe value to set.
const DtUUID& makVrf::DtStateData::nextFrameHostId ( ) const
Returns
The host UUID from the next-frame simulated object state component.
const DtUUID& makVrf::DtStateData::currentFrameHostId ( ) const
Returns
The host UUID from the current-frame simulated object state component.
bool makVrf::DtStateData::isClutterEntity ( ) const
Returns
True if this entity is flagged as a clutter entity in the current-frame entity state component.
void makVrf::DtStateData::setEntityType ( const DtEntityType &  type)

Sets both the cached entity type and the entity type on the next-frame simulated object state.

Parameters
typeThe new entity type.
void makVrf::DtStateData::setObjectType ( const DtEntityType &  type)
inline
DtEntityType makVrf::DtStateData::entityType ( ) const
Returns
The entity type from the current frame, falling back to the cached type if the component reports empty.
DtEntityType makVrf::DtStateData::objectType ( ) const
inline
Returns
The entity type from the current-frame simulated object state, or the cached type as a fallback.
void makVrf::DtStateData::setEntityId ( const DtEntityIdentifier &  s)

Sets the entity identifier on the next-frame simulated object state.

Parameters
sThe new entity identifier.
const DtEntityIdentifier& makVrf::DtStateData::entityId ( ) const
Returns
The entity identifier from the current-frame simulated object state.
virtual void makVrf::DtStateData::setAwaitingTransfer ( bool  b)
virtual

This will be set if the object is awaiting transfer from another simulation engine.

bool makVrf::DtStateData::awaitingTransfer ( ) const
inline
Returns
True if this entity is currently awaiting transfer from another simulation engine.
virtual void makVrf::DtStateData::initializeParameterData ( const DtVrfObjectParameters *  params)
virtual

Initialize all state components (next frame) with parameter data.

Parameters
paramsThe object parameters to apply to all registered state components.
virtual bool makVrf::DtStateData::createPublicData ( const DtVrfObjectParameters *  params,
bool  isReflectedObject,
const DtEntityType &  et 
)
virtual

Given the list of state data creators, if there does not appear a state data component by this type then create one.

Parameters
paramsThe object parameters defining which components to create.
isReflectedObjectTrue if this is a remotely reflected object.
etThe entity type used to select the appropriate component creators.
Returns
True if all required public data was successfully created.
SimStateID makVrf::DtStateData::stateId ( ) const
inline
Returns
The simulation state ID (index) of this state data within the state data manager's internal tables. The stateId() is the index into internal vectors that this state data is in the position of.

Referenced by makVrf::DtSimObjectManagerTemplate< T_BaseClass >::DeletedObjects::track().

template<typename T_Class >
void makVrf::DtStateData::removeInstanceUpdatedCallback ( Legion::InstanceHandle  instanceHandle,
unsigned int  callbackHandle 
)

Removes a previously registered Legion instance-updated callback.

Template Parameters
T_ClassThe Legion component type the callback was registered on.
Parameters
instanceHandleThe handle of the Legion instance.
callbackHandleThe handle returned by addInstanceUpdatedCallback().
template<typename T_Class >
unsigned int makVrf::DtStateData::addInstanceUpdatedCallback ( DtInstanceUpdatedCallback  callback,
Legion::InstanceHandle  instanceHandle,
const std::vector< Legion::AttributeIndex > &  attributeIndexFilter = std::vector< Legion::AttributeIndex >() 
)

Registers a callback that fires when the given Legion instance is updated.

Template Parameters
T_ClassThe Legion component type to monitor.
Parameters
callbackThe callback function to invoke.
instanceHandleThe Legion instance handle to monitor.
attributeIndexFilterOptional list of attribute indices to filter on.
Returns
A handle that can be passed to removeInstanceUpdatedCallback() to deregister.
virtual void makVrf::DtStateData::advanceFrame ( )
virtual

Advances the frame: processes pending component removals, calls advanceFrame on each registered state component, promotes newly created components to the current frame, and fires the signal_frameAdvanced signal.

virtual void makVrf::DtStateData::takeControlOfComponent ( DtStateComponent *  )
virtual

Takes ownership of the supplied component.

virtual void makVrf::DtStateData::setCoordinateSystem ( const Coordinate_System *  cs)
virtual

Sets the coordinate system in this state data and all components.

Parameters
csThe new coordinate system to use.
void makVrf::DtStateData::setIsLocal ( bool  b)

Sets whether this entity is simulated locally or is a remote reflection. Propagates the flag to all registered state components.

Parameters
bTrue if this entity is simulated locally.
bool makVrf::DtStateData::isLocal ( ) const
Returns
True if this entity is simulated locally (not a remote reflection).
PublishFlag makVrf::DtStateData::publishFlag ( ) const
inline
Returns
The current publish flag controlling network publication of this entity's state.
bool makVrf::DtStateData::isPublishedOnNetwork ( ) const
inline
Returns
True if state is published on the network (PublishAll or PublishComponentsOnly).
DtStateDataManager* makVrf::DtStateData::stateDataManager ( )
inline
Returns
Pointer to the owning state data manager.
const DtStateDataManager* makVrf::DtStateData::stateDataManager ( ) const
inline
Returns
Const pointer to the owning state data manager.
double makVrf::DtStateData::absRealTime ( ) const
Returns
The absolute real-world clock time from the state data manager, or 0 if none.
const Coordinate_System* makVrf::DtStateData::coordinateSystem ( ) const
inline
Returns
The coordinate system shared by this object and all its components.
Legion::WriteStateInstance makVrf::DtStateData::writeStateInstance ( )
inline
Returns
The main Legion write-state instance backing this entity.
Legion::ReadStateInstance* makVrf::DtStateData::readStateInstance ( ) const
inline
Returns
Pointer to the Legion read-state instance, or nullptr if this is a local-only object.

Referenced by makVrf::DtRemoteObjectManager::StateComponentAdder< T_VRFStateComponent, T_LegionComponent >::addStateComponent().

bool makVrf::DtStateData::convertedToLocal ( ) const
inline
Returns
True if this entity was originally remote and has been converted to a local entity.
UInt64 makVrf::DtStateData::legionGlobalId ( ) const

ID that is common to all objects that represent this data.

Referenced by makVrf::DtSimObjectManagerTemplate< T_BaseClass >::DeletedObjects::track().

virtual void makVrf::DtStateData::clearComponents ( )
virtual

Simply clears the state components vector, leaving the components dangling.

virtual DtLaserDesignatorStateComponent* makVrf::DtStateData::addLaserDesignator ( bool  isRemote = false)
virtual

Convenience routines for adding/removing components Creates and registers a new laser designator state component.

Parameters
isRemoteTrue if this component represents a remote entity's laser.
Returns
Pointer to the newly created component.
virtual void makVrf::DtStateData::removeLaserDesignator ( DtLaserDesignatorStateComponent *  comp)
virtual

Removes and destroys the given laser designator state component.

Parameters
compThe component to remove.
virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::lineTaskVisualization ( const DtString &  visualName,
const DtString &  component 
)
virtual

Creates or returns a line task visualization component for the given name and owning component.

Parameters
visualNameThe name of the visualization.
componentThe name of the owning sim component.
Returns
Pointer to the task visualization state component.
virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::pointTaskVisualization ( const DtString &  visualName,
const DtString &  component 
)
virtual

Creates or returns a point task visualization component for the given name and owning component.

Parameters
visualNameThe name of the visualization.
componentThe name of the owning sim component.
virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::areaTaskVisualization ( const DtString &  visualName,
const DtString &  component 
)
virtual

Creates or returns an area task visualization component for the given name and owning component.

Parameters
visualNameThe name of the visualization.
componentThe name of the owning sim component.
virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::textTaskVisualization ( const DtString &  visualName,
const DtString &  component 
)
virtual

Creates or returns a text task visualization component for the given name and owning component.

Parameters
visualNameThe name of the visualization.
componentThe name of the owning sim component.
virtual void makVrf::DtStateData::removeTaskVisualization ( DtTaskVisualizationStateComponent *  comp)
virtual

Removes and destroys the given task visualization state component.

Parameters
compThe component to remove.
virtual DtEmitterSystemStateComponent* makVrf::DtStateData::addEmitterSystem ( bool  isRemote = false)
virtual

Creates and registers a new emitter system state component.

Parameters
isRemoteTrue if this component represents a remote entity's emitter.
virtual void makVrf::DtStateData::removeEmitterSystem ( DtEmitterSystemStateComponent *  comp)
virtual

Removes and destroys the given emitter system state component.

virtual DtActiveSonarStateComponent* makVrf::DtStateData::addActiveSonarSystem ( bool  isRemote = false)
virtual

Creates and registers a new active sonar system state component.

Parameters
isRemoteTrue if this component represents a remote entity's sonar.
virtual void makVrf::DtStateData::removeActiveSonarSystem ( DtActiveSonarStateComponent *  comp)
virtual

Removes and destroys the given active sonar system state component.

virtual DtRadioTransmitterStateComponent* makVrf::DtStateData::addRadioTransmitter ( bool  isRemote = false)
virtual

Creates and registers a new radio transmitter state component.

Parameters
isRemoteTrue if this component represents a remote entity's transmitter.
virtual void makVrf::DtStateData::removeRadioTransmitter ( DtRadioTransmitterStateComponent *  comp)
virtual

Removes and destroys the given radio transmitter state component.

virtual DtNavAidRadioTransmitterStateComponent* makVrf::DtStateData::addNavAidRadioTransmitter ( bool  isRemote = false)
virtual

Creates and registers a new navigation-aid radio transmitter state component.

Parameters
isRemoteTrue if this component represents a remote entity's nav-aid transmitter.
virtual void makVrf::DtStateData::removeNavAidRadioTransmitter ( DtNavAidRadioTransmitterStateComponent *  comp)
virtual

Removes and destroys the given nav-aid radio transmitter state component.

virtual DtRadioReceiverStateComponent* makVrf::DtStateData::addRadioReceiver ( bool  isRemote = false)
virtual

Creates and registers a new radio receiver state component.

Parameters
isRemoteTrue if this component represents a remote entity's receiver.
virtual void makVrf::DtStateData::removeRadioReceiver ( DtRadioReceiverStateComponent *  comp)
virtual

Removes and destroys the given radio receiver state component.

virtual DtIffStateComponent* makVrf::DtStateData::getOrCreateIffSystem ( bool  isRemote = false)
virtual

Only one IFF available, so create or return the existing.

virtual void makVrf::DtStateData::removeIffSystem ( )
virtual

Removes and destroys the IFF system state component.

virtual DtUnderwaterAcousticsStateComponent* makVrf::DtStateData::getOrCreateUnderwaterAcousticsSystem ( bool  isRemote = false)
virtual

Only one Underwater Acoustics available, so, create or return the existing.

virtual void makVrf::DtStateData::removeUnderwaterAcousticsSystem ( )
virtual

Removes and destroys the underwater acoustics state component.

virtual void makVrf::DtStateData::removeStateComponent ( DtFrameStateInterface *  comp)
virtual

Queues the given frame state interface for removal on the next frame advance.

Parameters
compThe frame state interface to remove.
Legion::SimulationDatabase* makVrf::DtStateData::database ( )
inline
Returns
Pointer to the Legion simulation database.
virtual void makVrf::DtStateData::convertToRemote ( bool  onAdvanceFrame = true)
virtual

Convert this entity to a remote entity. If onAdvanceFrame is true will be done in an advance frame such that we know this is being done in a thread safe way for the entity – it will happen after the frame for the state data has been advanced.

virtual void makVrf::DtStateData::convertToLocal ( )
virtual

Convert this entity to a local entity. This is done immediately.

virtual int makVrf::DtStateData::indexOfComponent ( const DtFrameStateInterface *  ) const
virtual

Given the id of the component, get the type from the upper 32 bits and see where in the list this component is.

virtual UInt64 makVrf::DtStateData::instanceHandle ( const DtFrameStateInterface *  ) const
virtual

If there is a write legion component associated with this frame state interface, return the instance handle.

virtual void makVrf::DtStateData::shuttingDown ( )
virtual

Called when state data manager is exiting, prevents deletion of items from a now deleted state data manager.

virtual void makVrf::DtStateData::deletingComponent ( DtStateComponent *  )
virtual

Called when a component is getting deleted from the state data manager. Will remove from any internal structures to prevent double deletion.

const DtVrfObjectParameters* makVrf::DtStateData::parameters ( )
inline
Returns
Pointer to the object parameters used to initialize this state data's components, or nullptr.
static void makVrf::DtStateData::addDefaultPublicDataFor ( const std::string &  type,
const std::string &  componentCreator 
)
static

This is added for systems that might not have updated the ope files to the new format to get public data for a parameter type. The system will add the basic public data needed by parameter type from the DtStateDataManager to use as a default. The type can either be a parameter type, a specific entity type as defaulty defined by the parameter, or the display name Registers a default public-data component creator for the given parameter/entity type string.

Parameters
typeThe parameter type, entity type, or display name string to match.
componentCreatorThe name of the state component creator to associate as default public data.
static void makVrf::DtStateData::removeDefaultPublicDataFor ( const std::string &  type,
const std::string &  componentCreator 
)
static

Unregisters a previously added default public-data component creator for the given type string.

Parameters
typeThe parameter type, entity type, or display name string.
componentCreatorThe component creator name to remove.
static std::set<std::string> makVrf::DtStateData::defaultPublicDataFor ( DtEntityType  defaultEntityType,
const std::string &  dislpayName,
const std::string &  parameterType 
)
static

Returns the set of default public-data component creator names applicable to the given entity.

Parameters
defaultEntityTypeThe entity type used to match registered defaults.
dislpayNameThe display name used as an additional match key.
parameterTypeThe parameter type string used as an additional match key.
Returns
Set of component creator name strings that should be created as default public data.
static void makVrf::DtStateData::addPublicDataFor ( const std::string &  type,
const std::string &  componentCreator 
)
static

Same rules as addDefaultPublicDataFor, except this is public data that will be created in addition to the default public data Registers a supplemental public-data component creator for the given parameter/entity type string.

Parameters
typeThe parameter type, entity type, or display name string to match.
componentCreatorThe name of the state component creator to add as supplemental public data.
static void makVrf::DtStateData::removePublicDataFor ( const std::string &  type,
const std::string &  componentCreator 
)
static

Unregisters a previously added supplemental public-data component creator.

Parameters
typeThe parameter type, entity type, or display name string.
componentCreatorThe component creator name to remove.
static std::set<std::string> makVrf::DtStateData::additionalPublicDataFor ( DtEntityType  defaultEntityType,
const std::string &  dislpayName,
const std::string &  parameterType 
)
static

Returns the set of supplemental public-data component creator names applicable to the given entity.

Parameters
defaultEntityTypeThe entity type used to match registered entries.
dislpayNameThe display name used as an additional match key.
parameterTypeThe parameter type string used as an additional match key.
Returns
Set of additional component creator name strings to create beyond the defaults.
static void makVrf::DtStateData::setDefaultMainComponentFor ( const std::string &  type,
const std::string &  defaultPublicData 
)
static

Accessor for setting main component data. Same scheme as public data, except only a single main component Registers the default main component creator name for the given parameter/entity type string.

Parameters
typeThe parameter type, entity type, or display name string to associate.
defaultPublicDataThe component creator name to use as the default main component.
static std::string makVrf::DtStateData::defaultMainComponentFor ( DtEntityType  defaultEntityType,
const std::string &  dislpayName,
const std::string &  type 
)
static

Returns the default main component creator name for the given entity.

Parameters
defaultEntityTypeThe entity type used to match registered entries.
dislpayNameThe display name used as an additional match key.
typeThe parameter type string used as an additional match key.
Returns
The component creator name string, or an empty string if none is registered.
virtual void makVrf::DtStateData::aboutToBeDeleted ( )
virtual

Goes through all the signals that this item is going to be deleted without actually deleting the memory such that it can be deleted in a future tick. Only call this when the state data wants to be removed at a later time.

virtual void makVrf::DtStateData::setPublishingOnLegionNetwork ( bool  b)
virtual

Sets whether state for this entity should be published on the Legion network. Propagates the flag to all registered state components.

Parameters
bTrue to enable Legion network publication.
bool makVrf::DtStateData::publishingOnLegionNetwork ( ) const
inline
Returns
True if this entity's state is being published on the Legion network.
virtual const DtSimulatedObjectStateComponent* makVrf::DtStateData::currentFrameSimulatedObjectStateComponent ( ) const
virtual
Returns
Const pointer to the current-frame simulated object state component, or nullptr.
virtual const DtLocationStateComponent* makVrf::DtStateData::currentFrameLocationStateComponent ( ) const
virtual
Returns
Const pointer to the current-frame location state component, or nullptr.
virtual DtSimulatedObjectStateComponent* makVrf::DtStateData::nextFrameSimulatedObjectStateComponent ( )
protectedvirtual
Returns
Pointer to the next-frame writable simulated object state component, or nullptr.
virtual DtStateData* makVrf::DtStateData::currentFrameHostStateData ( ) const
protectedvirtual

Returns the current-frame state data of the host entity, traversing the host chain if needed. This method is intended for next-frame callers that need to read current-frame host data.

virtual bool makVrf::DtStateData::createMainData ( const DtVrfObjectParameters *  params,
const DtEntityType &  et 
)
protectedvirtual

Part of creating the public data is creating the main data. This call will create the main data state component based on object parameters.

virtual void makVrf::DtStateData::hostChanged ( const DtUUID &  oldUUID,
const DtUUID &  newUUID 
)
protectedvirtual

Called when the host entity's UUID has changed.

Parameters
oldUUIDThe previous host UUID.
newUUIDThe new host UUID.
virtual void makVrf::DtStateData::setupStateComponent ( DtStateComponent *  comp,
const DtVrfObjectParameters *  params = nullptr 
)
protectedvirtual

Configures the given state component with the provided object parameters.

Parameters
compThe state component to set up.
paramsObject parameters to apply; may be nullptr.
virtual void makVrf::DtStateData::subordinatesChanged ( const std::vector< DtUUID > &  oldSubordinates,
const std::vector< DtUUID > &  newSubordinates 
)
protectedvirtual

Called when the subordinate entity list has changed.

Parameters
oldSubordinatesThe previous list of subordinate UUIDs.
newSubordinatesThe updated list of subordinate UUIDs.
void makVrf::DtStateData::setPublishFlag ( PublishFlag  b)
inlineprotected

Only called during construction.

virtual std::string makVrf::DtStateData::defaultParameterTypeForEntityType ( const DtEntityType &  et) const
protectedvirtual

Given entity kind, return hard coded string for parameter type Returns the default parameter type string for the given entity type.

Parameters
etThe entity type to look up.
Returns
The parameter type string, or an empty string if none is defined.
virtual void makVrf::DtStateData::completeRemoteConversion ( )
protectedvirtual

Completes the conversion to a remote object (meaning the next frame will no longer be writable) and will signal that the object has been converted. Each component will get a convertToRemote call.

virtual void makVrf::DtStateData::hostWasDeleted ( )
protectedvirtual

Called when the host entity is destroyed; disconnects from the host and clears the cached pointer.

virtual void makVrf::DtStateData::removeStateComponent ( DtStateComponent::StateComponentType  t)
protectedvirtual

Removes all state components matching the given type from the next-frame and current-frame stores.

Parameters
tThe state component type to remove.
virtual void makVrf::DtStateData::uuidChanged ( const DtUUID &  oldUUID,
const DtUUID &  newUUID 
)
protectedvirtual

Called internally when this state data's UUID changes; fires signal_uuidChanged.

Parameters
oldUUIDThe previous UUID.
newUUIDThe new UUID.
virtual void makVrf::DtStateData::markingTextChanged ( const DtString &  oldText,
const DtString &  newText 
)
protectedvirtual

Called internally when this state data's marking text changes; fires signal_markingTextChanged.

Parameters
oldTextThe previous marking text.
newTextThe new marking text.

Friends And Related Function Documentation

friend class DtStateDataManager
friend
friend class DtExternalNextFrameState
friend

Member Data Documentation

boost::signals2::signal<void (const DtStateData*)> makVrf::DtStateData::signal_firstFrameAdvance
mutable

Signal sent on the first frame advance.

boost::signals2::signal<void(const DtUUID&, const DtUUID&, SimStateID)> makVrf::DtStateData::signal_uuidChanged
mutable

Signal emitted when this state data's UUID changes. Listeners receive the old UUID, the new UUID, and the state ID.

boost::signals2::signal<void(const DtString&, const DtString&, const DtUUID&, SimStateID)> makVrf::DtStateData::signal_markingTextChanged

Signal emitted when this state data's marking text changes. Listeners receive the old text, the new text, the associated UUID, and the state ID.

boost::signals2::signal<void (const DtStateData*, const DtUUID& oldUUID, const DtUUID& newUUID)> makVrf::DtStateData::signal_hostChanged

Signal sent when the host has changed.

boost::signals2::signal<void (const DtStateData*)> makVrf::DtStateData::signal_stateDataToBeDestroyed
mutable

Signal emitted just before this state data object is destroyed. Listeners receive the state data pointer.

boost::signals2::signal<void (SimStateID)> makVrf::DtStateData::signal_preFrameAdvanced

Signal emitted at the beginning of frame advance, before component data is swapped. Listeners receive the state ID.

boost::signals2::signal<void (const DtStateData*)> makVrf::DtStateData::signal_frameAdvanced
mutable

Signal sent regardless of whether or not this state had any modified components.

boost::signals2::signal<void (const DtStateData*)> makVrf::DtStateData::signal_modified

Signal sent if this state had modified components.

boost::signals2::signal<void (DtStateData*)> makVrf::DtStateData::signal_convertingToRemote

Signal emitted when conversion from local to remote is about to begin. Listeners receive the state data pointer.

boost::signals2::signal<void (DtStateData*)> makVrf::DtStateData::signal_convertedToRemote

Signal emitted when conversion to a remote representation is complete. Listeners receive the state data pointer.

boost::signals2::signal<void (DtStateData*)> makVrf::DtStateData::signal_convertingToLocal

Signal emitted when conversion from remote to local is about to begin. Listeners receive the state data pointer.

boost::signals2::signal<void (DtStateData*)> makVrf::DtStateData::signal_convertedToLocal

Signal emitted when conversion to a locally simulated representation is complete. Listeners receive the state data pointer.

boost::signals2::signal<void (DtStateComponent*)> makVrf::DtStateData::signal_stateComponentAdded
mutable

Signal emitted whenever a state component is added to this state data. Listeners receive a pointer to the newly added component.

boost::signals2::signal<void (DtStateComponent*)> makVrf::DtStateData::signal_stateComponentRemoved
mutable

Signal emitted whenever a state component is removed from this state data. Listeners receive a pointer to the removed component.

boost::signals2::signal<void (const DtStateData*, const std::vector<DtUUID>& added, const std::vector<DtUUID>& removed)> makVrf::DtStateData::signal_subordinatesChanged

Signal emitted when the set of subordinate entities changes. Listeners receive the state data pointer, the added UUIDs, and the removed UUIDs.

DtExternalNextFrameState makVrf::DtStateData::myNextFrameState
protected

Write-access view of state components for the upcoming frame.

DtExternalCurrentFrameState makVrf::DtStateData::myCurrentFrameState
protected

Read-only view of state components from the last completed frame.

DtStateDataManager* makVrf::DtStateData::myStateDataManager
protected

The state data manager that owns and manages this state data, or nullptr.

Legion::SimulationDatabase* makVrf::DtStateData::myDatabase
protected

Pointer to the Legion simulation database used to publish and receive updates.

Legion::WriteStateInstance makVrf::DtStateData::myWriteStateInstance
protected

The basic data. This is what all components are hung off of if they are STE compliant.

Legion::ReadStateInstance* makVrf::DtStateData::myReadStateInstance
protected

Pointer to the Legion read-state instance for receiving remote updates; may be nullptr for local entities.

SimStateID makVrf::DtStateData::mySimStateID
protected

Unique simulation state identifier assigned to this state data.

bool makVrf::DtStateData::myIsModified = true
protected

True if any state component was modified since the last frame advance.

PublishFlag makVrf::DtStateData::myPublishFlag
protected

Simulated locally vs. remote representation.

const Coordinate_System* makVrf::DtStateData::myCoordinateSystem
protected

The coordinate system used when converting position data for this entity.

int makVrf::DtStateData::mySessionId
protected

Session identifier for the current simulation session.

std::vector<std::vector<DtStateComponent*> > makVrf::DtStateData::myStateComponents
protected

Two-dimensional array of state components indexed by StateComponentType and component index.

std::vector<std::vector<DtStateComponent*> > makVrf::DtStateData::myCreatedStateComponents
protected

Two-dimensional array tracking components created (owned) by this state data.

std::set<DtFrameStateInterface*> makVrf::DtStateData::myRemoveStateComponents
protected

Set of frame state interfaces queued for removal on the next frame advance.

bool makVrf::DtStateData::myAdvancedFrame
protected

True after the first call to advanceFrame().

bool makVrf::DtStateData::myConvertToRemote
protected

True if this state data is pending conversion to a remote representation.

bool makVrf::DtStateData::myAwaitingTransfer
protected

True if this entity is awaiting an ownership transfer.

UInt64 makVrf::DtStateData::myLegionGlobalId
protected

The Legion global identifier for this entity.

std::atomic<unsigned int> makVrf::DtStateData::myComponentNumber
protected

Monotonically increasing counter used to assign unique indices to newly created components.

boost::signals2::scoped_connection makVrf::DtStateData::mySubordinatesChangedConnection
protected

Connection tracking changes to the subordinate entity list.

boost::signals2::scoped_connection makVrf::DtStateData::myHostChangedConnection
protected

Connection tracking host UUID changes.

boost::signals2::scoped_connection makVrf::DtStateData::myUUIDChangedConnection
protected

Connection tracking UUID changes on this entity.

boost::signals2::scoped_connection makVrf::DtStateData::myMarkingTextChangedConnection
protected

Connection tracking marking text changes on this entity.

boost::signals2::scoped_connection makVrf::DtStateData::myHostWasDeletedConnection
mutableprotected

Connection tracking host entity deletion.

PublicData makVrf::DtStateData::theDefaultPublicData
staticprotected

Default public data keyed by parameter type, shared across all instances.

PublicData makVrf::DtStateData::theAdditionalPublicData
staticprotected

Additional public data (beyond the default) keyed by parameter type, shared across all instances.

DefaultMainComponentMap makVrf::DtStateData::theDefaultMainComponentMap
staticprotected

Shared map of default main component assignments, keyed by type string.

bool makVrf::DtStateData::myCleared
protected

True if this state data has been cleared (all components invalidated and removed).

const DtVrfObjectParameters* makVrf::DtStateData::myParameters
protected

Object parameters used during initialization; not owned by this class.

bool makVrf::DtStateData::myPublishingOnLegionNetwork
protected

True if state for this entity is being published on the Legion network.

bool makVrf::DtStateData::myMainComponentOnLegion
protected

True if the main (primary) component for this entity resides on the Legion network.

const DtSimulatedObjectStateComponent* makVrf::DtStateData::myCurrentFrameSimulatedObjectStateComponent
protected

Cached pointer to the current-frame simulated object state component for fast access.

const DtLocationStateComponent* makVrf::DtStateData::myCurrentFrameLocationStateComponent
protected

Cached pointer to the current-frame location state component for fast access.

const DtLocationStateComponent* makVrf::DtStateData::myNextFrameLocationStateComponent = nullptr
protected

Cached pointer to the next-frame location state component; nullptr until first assignment.

DtSimulatedObjectStateComponent* makVrf::DtStateData::myNextFrameSimulatedObjectStateComponent
protected

Cached pointer to the next-frame writable simulated object state component.

DtStateData* makVrf::DtStateData::myCurrentFrameHostStateData
mutableprotected

Mutable cache of the current-frame host state data pointer; updated lazily.

tbb::spin_rw_mutex makVrf::DtStateData::myCurrentFrameHostStateDataMutex
mutableprotected

Reader-writer mutex protecting myCurrentFrameHostStateData during concurrent access.

tbb::mutex makVrf::DtStateData::theCreateInstanceMutex
staticprotected

Mutex used to serialize concurrent calls to createInstance() across all state data instances.

bool makVrf::DtStateData::myAdvancingFrame = false
protected

True while frame advance is in progress.

bool makVrf::DtStateData::myConvertedToLocal = false
protected

True after this state data has been successfully converted from remote to local simulation.

bool makVrf::DtStateData::myAddToSimObjectManager = true
protected

True if this state data should register with the DtSimObjectManager on creation.

bool makVrf::DtStateData::myOwnsComponents = false
protected

True if this state data owns (and will destroy) its registered components.

DtString makVrf::DtStateData::myMarkingText
protected

The current marking text (callsign / label) for this entity.

DtEntityType makVrf::DtStateData::myEntityType
protected

The entity type of this entity, used to select default parameter types.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)