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, 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
 
DtExternalNextFrameStatenextFrameState ()
 
const DtExternalCurrentFrameStatecurrentFrameState () const
 
virtual DtStateComponentcreateStateComponent (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 >
DtStateComponentgetStateComponent (int index=0)
 
template<typename T_Component >
const DtStateComponentgetStateComponent (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 DtUUIDuuid () const
 
void setUUID (const DtUUID &)
 
void setCheckForNameReservation (bool)
 
bool checkForNameReservation () const
 
void setGlobalId (const DtString &s)
 
const DtStringglobalId () const
 
void setMarkingText (const DtString &name)
 
const DtStringmarkingText () const
 
void setAppearance (const DtAppearance &)
 
DtAppearance appearance () const
 
void setForceType (DtForceType force)
 
DtForceType forceType () const
 
const DtString parentGlobalId () const
 
DtString parentGlobalId ()
 
const DtStringextendedData (const DtString &key) const
 
const DtStringnextFrameExtendedData (const DtString &key) const
 
void setExtendedData (const DtString &key, const DtString &value)
 
const DtUUIDnextFrameHostId () const
 
const DtUUIDcurrentFrameHostId () 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
 
DtStateDataManagerstateDataManager ()
 
const DtStateDataManagerstateDataManager () const
 
double absRealTime () const
 
const Coordinate_SystemcoordinateSystem () 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 DtVrfObjectParametersparameters ()
 
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 DtIffStateComponentgetOrCreateIffSystem (bool isRemote=false)
 
virtual void removeIffSystem ()
 
virtual
DtUnderwaterAcousticsStateComponent
getOrCreateUnderwaterAcousticsSystem (bool isRemote=false)
 
virtual void removeUnderwaterAcousticsSystem ()
 
virtual void removeStateComponent (DtFrameStateInterface *)
 

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 DtStateDatacurrentFrameHostStateData () const
 
virtual bool createMainData (const DtVrfObjectParameters *params, const DtEntityType &et)
 
virtual void hostChanged (const DtUUID &oldUUID, const DtUUID &newUUID)
 
virtual void setupStateComponent (DtStateComponent *, 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 &) 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 &oldUUID, const DtString &newUUID)
 

Protected Attributes

DtExternalNextFrameState myNextFrameState
 
DtExternalCurrentFrameState myCurrentFrameState
 
DtStateDataManagermyStateDataManager
 
Legion::SimulationDatabase * myDatabase
 
Legion::WriteStateInstance myWriteStateInstance
 
Legion::ReadStateInstance * myReadStateInstance
 
SimStateID mySimStateID
 
bool myIsModified = true
 
PublishFlag myPublishFlag
 
const Coordinate_SystemmyCoordinateSystem
 
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 intmyComponentNumber
 
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 DtVrfObjectParametersmyParameters
 
bool myPublishingOnLegionNetwork
 
bool myMainComponentOnLegion
 
const
DtSimulatedObjectStateComponent
myCurrentFrameSimulatedObjectStateComponent
 
const DtLocationStateComponentmyCurrentFrameLocationStateComponent
 
const DtLocationStateComponentmyNextFrameLocationStateComponent = nullptr
 
DtSimulatedObjectStateComponentmyNextFrameSimulatedObjectStateComponent
 
DtStateDatamyCurrentFrameHostStateData
 
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

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

Member Enumeration Documentation

Enumerator
DoNotPublish 
PublishAll 
PublishComponentsOnly 

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  ,
Legion::SimulationDatabase *  ,
DtStateDataManager  
)
makVrf::DtStateData::DtStateData ( SimStateID  ,
makVrf::UInt64  ,
Legion::SimulationDatabase *  ,
DtStateDataManager  
)
virtual makVrf::DtStateData::~DtStateData ( )
virtual

DTOR.

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::isValid ( ) const
virtual
virtual bool makVrf::DtStateData::isWritable ( ) const
virtual
virtual void makVrf::DtStateData::clearStateDataManager ( )
virtual
virtual void makVrf::DtStateData::setAddToSimObjectManager ( bool  )
virtual
bool makVrf::DtStateData::addToSimObjectManager ( ) const
inline
template<typename T_Component >
int makVrf::DtStateData::getNextFrameNumberOfLegionComponents ( )
inline
template<typename T_Component >
int makVrf::DtStateData::getCurrentFrameNumberOfLegionComponents ( ) const
inline
template<typename T_Component >
unsigned int makVrf::DtStateData::componentCount ( ) const
inline
template<typename T_Component >
T_Component makVrf::DtStateData::findNextFrameLegionComponent ( int  index = 0)
inline
template<typename T_Component >
T_Component makVrf::DtStateData::findCurrentFrameLegionComponent ( int  index = 0) const
inline
virtual void makVrf::DtStateData::markModified ( )
virtual
virtual void makVrf::DtStateData::clearModified ( )
virtual
virtual void makVrf::DtStateData::removeNextFrameStateComponent ( const DtFrameStateInterface f)
virtual
virtual void makVrf::DtStateData::removeCurrentFrameStateComponent ( const DtFrameStateInterface f)
virtual
bool makVrf::DtStateData::isModified ( ) const
bool makVrf::DtStateData::advancedFrame ( ) const
inline
bool makVrf::DtStateData::advancingFrame ( ) const
inline
DtExternalNextFrameState* makVrf::DtStateData::nextFrameState ( )
inline
const DtExternalCurrentFrameState* makVrf::DtStateData::currentFrameState ( ) const
inline
virtual DtStateComponent* makVrf::DtStateData::createStateComponent ( DtStateComponent::StateComponentType  t)
virtual
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
void makVrf::DtStateData::destroyMainInstance ( )
inline
void makVrf::DtStateData::destroyInstance ( const Legion::WriteStateInstance &  wsi)
inline
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
template<typename T_Component >
T_Component makVrf::DtStateData::createUnattachedInstance ( )
inline
template<typename T_Component >
T_Component makVrf::DtStateData::createInstance ( )
inline
template<typename T_Component >
DtStateComponent* makVrf::DtStateData::getStateComponent ( int  index = 0)
inline
template<typename T_Component >
const DtStateComponent* makVrf::DtStateData::getStateComponent ( int  index = 0) const
inline
template<typename T_Component >
std::vector<T_Component*> makVrf::DtStateData::getNextFrameStateComponentList ( ) const
inline
template<typename T_Component >
std::vector<const T_Component*> makVrf::DtStateData::getCurrentFrameStateComponentList ( ) const
inline
template<typename T_Component >
bool makVrf::DtStateData::hasStateComponent ( bool  checkWritable = false)
inline
template<typename T_Component >
const bool makVrf::DtStateData::hasStateComponent ( ) const
inline
template<typename T_Component >
T_Component* makVrf::DtStateData::nextFrameStateComponent ( )
inline
template<typename T_Component >
const T_Component* makVrf::DtStateData::currentFrameStateComponent ( ) const
inline
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)
bool makVrf::DtStateData::cleared ( ) const
inline
bool makVrf::DtStateData::frozen ( ) const

Retuns true if the location component is frozen.

void makVrf::DtStateData::setUserData ( unsigned long  long)
unsigned long long makVrf::DtStateData::userData ( ) const
const DtUUID& makVrf::DtStateData::uuid ( ) const
void makVrf::DtStateData::setUUID ( const DtUUID )
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
void makVrf::DtStateData::setGlobalId ( const DtString s)
const DtString& makVrf::DtStateData::globalId ( ) const
void makVrf::DtStateData::setMarkingText ( const DtString name)
const DtString& makVrf::DtStateData::markingText ( ) const
void makVrf::DtStateData::setAppearance ( const DtAppearance &  )
DtAppearance makVrf::DtStateData::appearance ( ) const
void makVrf::DtStateData::setForceType ( DtForceType  force)
DtForceType makVrf::DtStateData::forceType ( ) const
const DtString makVrf::DtStateData::parentGlobalId ( ) const
DtString makVrf::DtStateData::parentGlobalId ( )
const DtString& makVrf::DtStateData::extendedData ( const DtString key) const
const DtString& makVrf::DtStateData::nextFrameExtendedData ( const DtString key) const
void makVrf::DtStateData::setExtendedData ( const DtString key,
const DtString value 
)
const DtUUID& makVrf::DtStateData::nextFrameHostId ( ) const
const DtUUID& makVrf::DtStateData::currentFrameHostId ( ) const
bool makVrf::DtStateData::isClutterEntity ( ) const
void makVrf::DtStateData::setEntityType ( const DtEntityType &  type)

The entity type.

void makVrf::DtStateData::setObjectType ( const DtEntityType &  type)
inline
DtEntityType makVrf::DtStateData::entityType ( ) const
inline
DtEntityType makVrf::DtStateData::objectType ( ) const
void makVrf::DtStateData::setEntityId ( const DtEntityIdentifier &  s)
DtEntityIdentifier makVrf::DtStateData::entityId ( ) const
virtual void makVrf::DtStateData::setAwaitingTransfer ( bool  )
virtual

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

bool makVrf::DtStateData::awaitingTransfer ( ) const
inline
virtual void makVrf::DtStateData::initializeParameterData ( const DtVrfObjectParameters )
virtual

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

virtual bool makVrf::DtStateData::createPublicData ( const DtVrfObjectParameters ,
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.

SimStateID makVrf::DtStateData::stateId ( ) const
inline

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 
)
template<typename T_Class >
unsigned int makVrf::DtStateData::addInstanceUpdatedCallback ( DtInstanceUpdatedCallback  callback,
Legion::InstanceHandle  instanceHandle,
const std::vector< Legion::AttributeIndex > &  attributeIndexFilter = std::vector< Legion::AttributeIndex >() 
)
virtual void makVrf::DtStateData::advanceFrame ( )
virtual
virtual void makVrf::DtStateData::takeControlOfComponent ( DtStateComponent )
virtual

Takes ownership of the supplied component.

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

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

void makVrf::DtStateData::setIsLocal ( bool  b)
bool makVrf::DtStateData::isLocal ( ) const
PublishFlag makVrf::DtStateData::publishFlag ( ) const
inline
bool makVrf::DtStateData::isPublishedOnNetwork ( ) const
inline
DtStateDataManager* makVrf::DtStateData::stateDataManager ( )
inline
const DtStateDataManager* makVrf::DtStateData::stateDataManager ( ) const
inline
double makVrf::DtStateData::absRealTime ( ) const
const Coordinate_System* makVrf::DtStateData::coordinateSystem ( ) const
inline
Legion::WriteStateInstance makVrf::DtStateData::writeStateInstance ( )
inline
Legion::ReadStateInstance* makVrf::DtStateData::readStateInstance ( ) const
inline
bool makVrf::DtStateData::convertedToLocal ( ) const
inline
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.

virtual void makVrf::DtStateData::removeLaserDesignator ( DtLaserDesignatorStateComponent )
virtual

Convenience routines for adding/removing components.

virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::lineTaskVisualization ( const DtString visualName,
const DtString component 
)
virtual

Convenience routines for adding/removing components.

virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::pointTaskVisualization ( const DtString visualName,
const DtString component 
)
virtual

Convenience routines for adding/removing components.

virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::areaTaskVisualization ( const DtString visualName,
const DtString component 
)
virtual

Convenience routines for adding/removing components.

virtual DtTaskVisualizationStateComponent* makVrf::DtStateData::textTaskVisualization ( const DtString visualName,
const DtString component 
)
virtual

Convenience routines for adding/removing components.

virtual void makVrf::DtStateData::removeTaskVisualization ( DtTaskVisualizationStateComponent )
virtual

Convenience routines for adding/removing components.

virtual DtEmitterSystemStateComponent* makVrf::DtStateData::addEmitterSystem ( bool  isRemote = false)
virtual

Convenience routines for adding/removing components.

virtual void makVrf::DtStateData::removeEmitterSystem ( DtEmitterSystemStateComponent )
virtual

Convenience routines for adding/removing components.

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

Convenience routines for adding/removing components.

virtual void makVrf::DtStateData::removeActiveSonarSystem ( DtActiveSonarStateComponent )
virtual

Convenience routines for adding/removing components.

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

Convenience routines for adding/removing components.

virtual void makVrf::DtStateData::removeRadioTransmitter ( DtRadioTransmitterStateComponent )
virtual

Convenience routines for adding/removing components.

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

Convenience routines for adding/removing components.

virtual void makVrf::DtStateData::removeNavAidRadioTransmitter ( DtNavAidRadioTransmitterStateComponent )
virtual

Convenience routines for adding/removing components.

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

Convenience routines for adding/removing components.

virtual void makVrf::DtStateData::removeRadioReceiver ( DtRadioReceiverStateComponent )
virtual

Convenience routines for adding/removing components.

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

Convenience routines for adding/removing components.

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

Convenience routines for adding/removing components.

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

Convenience routines for adding/removing components.

Legion::SimulationDatabase* makVrf::DtStateData::database ( )
inline
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
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.

static void makVrf::DtStateData::removeDefaultPublicDataFor ( 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.

static std::set<std::string> makVrf::DtStateData::defaultPublicDataFor ( DtEntityType  defaultEntityType,
const std::string &  dislpayName,
const std::string &  parameterType 
)
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.

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.

static void makVrf::DtStateData::removePublicDataFor ( const std::string &  type,
const std::string &  componentCreator 
)
static
static std::set<std::string> makVrf::DtStateData::additionalPublicDataFor ( DtEntityType  defaultEntityType,
const std::string &  dislpayName,
const std::string &  parameterType 
)
static
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.

static std::string makVrf::DtStateData::defaultMainComponentFor ( DtEntityType  defaultEntityType,
const std::string &  dislpayName,
const std::string &  type 
)
static

Accessor for setting main component data. Same scheme as public data, except only a single main component.

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
bool makVrf::DtStateData::publishingOnLegionNetwork ( ) const
inline
virtual const DtSimulatedObjectStateComponent* makVrf::DtStateData::currentFrameSimulatedObjectStateComponent ( ) const
virtual
virtual const DtLocationStateComponent* makVrf::DtStateData::currentFrameLocationStateComponent ( ) const
virtual
virtual DtSimulatedObjectStateComponent* makVrf::DtStateData::nextFrameSimulatedObjectStateComponent ( )
protectedvirtual
virtual DtStateData* makVrf::DtStateData::currentFrameHostStateData ( ) const
protectedvirtual

This method is intended for next.

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
virtual void makVrf::DtStateData::setupStateComponent ( DtStateComponent ,
const DtVrfObjectParameters params = nullptr 
)
protectedvirtual
virtual void makVrf::DtStateData::subordinatesChanged ( const std::vector< DtUUID > &  oldSubordinates,
const std::vector< DtUUID > &  newSubordinates 
)
protectedvirtual
void makVrf::DtStateData::setPublishFlag ( PublishFlag  b)
inlineprotected

Only called during construction.

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

Given entity kind, return hard coded string for parameter type.

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
virtual void makVrf::DtStateData::removeStateComponent ( DtStateComponent::StateComponentType  t)
protectedvirtual
virtual void makVrf::DtStateData::uuidChanged ( const DtUUID oldUUID,
const DtUUID newUUID 
)
protectedvirtual
virtual void makVrf::DtStateData::markingTextChanged ( const DtString oldUUID,
const DtString newUUID 
)
protectedvirtual

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
boost::signals2::signal<void(const DtString&, const DtString&, const DtUUID&, SimStateID)> makVrf::DtStateData::signal_markingTextChanged
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
boost::signals2::signal<void (SimStateID)> makVrf::DtStateData::signal_preFrameAdvanced
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
boost::signals2::signal<void (DtStateData*)> makVrf::DtStateData::signal_convertedToRemote
boost::signals2::signal<void (DtStateData*)> makVrf::DtStateData::signal_convertingToLocal
boost::signals2::signal<void (DtStateData*)> makVrf::DtStateData::signal_convertedToLocal
boost::signals2::signal<void (DtStateComponent*)> makVrf::DtStateData::signal_stateComponentAdded
mutable
boost::signals2::signal<void (DtStateComponent*)> makVrf::DtStateData::signal_stateComponentRemoved
mutable
boost::signals2::signal<void (const DtStateData*, const std::vector<DtUUID>& added, const std::vector<DtUUID>& removed)> makVrf::DtStateData::signal_subordinatesChanged
DtExternalNextFrameState makVrf::DtStateData::myNextFrameState
protected

Even though this class contains the components, the frame classes will give access to those components in such a way that a current frame component will not have access to next frame data nor will a next frame component have access to current frame data.

DtExternalCurrentFrameState makVrf::DtStateData::myCurrentFrameState
protected
DtStateDataManager* makVrf::DtStateData::myStateDataManager
protected
Legion::SimulationDatabase* makVrf::DtStateData::myDatabase
protected
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
SimStateID makVrf::DtStateData::mySimStateID
protected
bool makVrf::DtStateData::myIsModified = true
protected
PublishFlag makVrf::DtStateData::myPublishFlag
protected

Simulated locally vs. remote representation.

const Coordinate_System* makVrf::DtStateData::myCoordinateSystem
protected
int makVrf::DtStateData::mySessionId
protected
std::vector<std::vector<DtStateComponent*> > makVrf::DtStateData::myStateComponents
protected
std::vector<std::vector<DtStateComponent*> > makVrf::DtStateData::myCreatedStateComponents
protected
std::set<DtFrameStateInterface*> makVrf::DtStateData::myRemoveStateComponents
protected
bool makVrf::DtStateData::myAdvancedFrame
protected
bool makVrf::DtStateData::myConvertToRemote
protected
bool makVrf::DtStateData::myAwaitingTransfer
protected
UInt64 makVrf::DtStateData::myLegionGlobalId
protected
std::atomic<unsigned int> makVrf::DtStateData::myComponentNumber
protected
boost::signals2::scoped_connection makVrf::DtStateData::mySubordinatesChangedConnection
protected
boost::signals2::scoped_connection makVrf::DtStateData::myHostChangedConnection
protected
boost::signals2::scoped_connection makVrf::DtStateData::myUUIDChangedConnection
protected
boost::signals2::scoped_connection makVrf::DtStateData::myMarkingTextChangedConnection
protected
boost::signals2::scoped_connection makVrf::DtStateData::myHostWasDeletedConnection
mutableprotected
PublicData makVrf::DtStateData::theDefaultPublicData
staticprotected
PublicData makVrf::DtStateData::theAdditionalPublicData
staticprotected
DefaultMainComponentMap makVrf::DtStateData::theDefaultMainComponentMap
staticprotected
bool makVrf::DtStateData::myCleared
protected
const DtVrfObjectParameters* makVrf::DtStateData::myParameters
protected
bool makVrf::DtStateData::myPublishingOnLegionNetwork
protected
bool makVrf::DtStateData::myMainComponentOnLegion
protected
const DtSimulatedObjectStateComponent* makVrf::DtStateData::myCurrentFrameSimulatedObjectStateComponent
protected
const DtLocationStateComponent* makVrf::DtStateData::myCurrentFrameLocationStateComponent
protected
const DtLocationStateComponent* makVrf::DtStateData::myNextFrameLocationStateComponent = nullptr
protected
DtSimulatedObjectStateComponent* makVrf::DtStateData::myNextFrameSimulatedObjectStateComponent
protected
DtStateData* makVrf::DtStateData::myCurrentFrameHostStateData
mutableprotected
tbb::spin_rw_mutex makVrf::DtStateData::myCurrentFrameHostStateDataMutex
mutableprotected
tbb::mutex makVrf::DtStateData::theCreateInstanceMutex
staticprotected
bool makVrf::DtStateData::myAdvancingFrame = false
protected
bool makVrf::DtStateData::myConvertedToLocal = false
protected
bool makVrf::DtStateData::myAddToSimObjectManager = true
protected
bool makVrf::DtStateData::myOwnsComponents = false
protected
DtString makVrf::DtStateData::myMarkingText
protected
DtEntityType makVrf::DtStateData::myEntityType
protected

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

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)