VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VRF GUI Sim Object Manager

Table of Contents

The makVrf::DtVrfGuiSimObjectManager is the class that contains a collection of all the gui sim object data collected from the network thread.

All the data in these objects are populated from the vrlink network remote interfaces and placed into the statae components associated with each object. The Add State Component GUI example shows how to add one particular kind of new state entry data to an object. You can access this data in multiple ways:

The third way is the way is the makVrf::DtVrfGuiSimObjectManager. This singleton is a single entry point for all the differnt types of objects in the system. You can use this class to find data by DtUUID or by the objects element id. You can use this class to find a particular makVrf::DtSimObjectReference

boost::optional<int> numHits =
ref->stateProperties().findPropertyValue<int>("TargetsHit");
if (numHits)
{
return QString::number(*numHits);
}

of Updates to Objects

All objects, once retrieved, can be accessed in a thread safe way. If you want to know when an object overall has been updated you can connect to its modified signal

DtSimObjectReference ref = DtVrfGuiSimObjectManager::instance(myDe).lookup(<uuid>);
if (ref.isValid())
{
ref->signal_modified.connect(
boost::bind(&MyObject::slot_objectModified, this, std::placeholders::_1));
}
void MyObject::slot_objectModified(DtSimObjectReference ref)
{
}

You can also be notified when a particular state component of an object is updated rather than the whole object:

ref->signalWhenModified<DtStatePropertiesStateComponent>().connect(
boost::bind(&MyObject::slot_stateComponentUpdated, this, std::placeholders::_1));
void MyObject::slot_stateComponentUpdated(DtSimObjectReference ref)
{
}

If you want to be notified when objects are added or removed from the system you can use the DtVrfGuiSimObjectManager for that notification:

DtVrfGuiSimObjectManager::instance(myDe).signal_objectAdded.connect(
boost::bind(&MyObject::slot_onObjectAdded, this, boost::placeholders::_1));
DtVrfGuiSimObjectManager::instance(myDe).signal_objectDeleted.connect(
boost::bind(&MyObject::slot_onObjectDeleted, this, boost::placeholders::_1));
void MyObject::slot_onObjectAdded(DtSimObjectReference s)
{
}
void MyObject::slot_onObjectDeleted(DtSimObjectReference s)
{
}

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)