![]() |
VR-Link API Documentation for HLA Evolved
|
class DtHlaObjectManager: More...
Collaboration diagram for DtHlaObjectManager:Public Member Functions | |
| DtHlaObjectManager (DtHlaObjectFactory *factory, DtExerciseConn *conn) | |
| Constructor. | |
| virtual | ~DtHlaObjectManager () |
| Destructor. | |
| virtual const DtList & | allHlaObjects () const |
| Get the list of all HLA objects known to the federate. | |
| virtual const DtList & | registeredObjects () const |
| Get the list of all HLA objects registered by the federate. | |
| virtual const DtList & | discoveredObjects () const |
| Get the list of all HLA objects discovered by the federate. | |
| virtual DtHlaObject * | hlaObject (RTI::ObjectHandle id) const |
| Get the HLA object based on its identifier. | |
| virtual DtHlaObject * | hlaObject (const char *name) const |
| Get the HLA object based on its name. | |
| virtual void | addDiscoverObjectCallback (RTI::ObjectClassHandle handle, DtDiscoverObjectCb cb, void *usr) |
| Add/remove a callback to be called when an object which meets the federate's subscription criteria is discovered. | |
| virtual void | removeDiscoverObjectCallback (RTI::ObjectClassHandle handle, DtDiscoverObjectCb cb, void *usr) |
| virtual void | addRemoveObjectCallback (RTI::ObjectHandle id, DtRemoveObjectCb cb, void *usr) |
| Add/remove a callback to be called when an object has been removed from the federation or no longer meets the interest criteria of the federate. | |
| virtual void | removeRemoveObjectCallback (RTI::ObjectHandle id, DtRemoveObjectCb cb, void *usr) |
| virtual const DtHlaObject * | processDiscoverObject (RTI::ObjectHandle id, RTI::ObjectClassHandle handle, const char *name) |
| Process the discovery of an object. | |
| virtual const DtHlaObject * | processDiscoverObject (RTI::ObjectInstanceHandle id, RTI::ObjectClassHandle handle, const std::wstring &name, RTI::FederateHandle registeringFederate) |
| This form of processDiscoverObject takes the additional argument registeringFederate, indicating the Federate Handle of the federate that registered the object. | |
| virtual const DtHlaObject * | processDiscoverObject (DtHlaObject *hlaObj) |
| Same as above, but takes an existing DtHlaObject. | |
| virtual void | processRemoveObject (RTI::ObjectHandle id) |
| Process the removal of an object. | |
| virtual void | processRemoveObject (DtHlaObject *obj) |
| Same as above, but takes an existing DtHlaObject. | |
| virtual void | processReflectAttributeValues (const DtStateMsg &msg) |
| Process an update message. | |
| virtual void | processProvideUpdate (RTI::ObjectHandle id, const RTI::AttributeHandleSet &theAttributes) |
| Process RTI's provideUpdate service. | |
| virtual void | processLocalUpdateRequest (RTI::ObjectClassHandle hand, const RTI::AttributeHandleSet &set) |
| When we are reflecting local data, this function is called to let the object manager know that we have locally requested updates for a class/set of attributes. | |
| virtual void | localSubscriptionChanged (RTI::ObjectClassHandle handle) |
| Called when the local subscription information changes. | |
| virtual void | publicationChanged (RTI::ObjectClassHandle handle) |
| Called when the local publication information changes. | |
| virtual void | processAttributeAcquisition (RTI::ObjectHandle id, const RTI::AttributeHandleSet &attrs) |
| Process RTI's attributeOwnershipAcquisitionNotification service. | |
| virtual void | processAttributeDivestiture (RTI::ObjectHandle id, const RTI::AttributeHandleSet &attrs) |
| Process RTI's attributeOwnershipDivestitureNotification service. | |
| virtual void | processRequestAssumption (RTI::ObjectHandle id, const RTI::AttributeHandleSet &attrs, const char *tag) |
| Process RTI's requestAttributeOwnershipAssumption service. | |
| virtual void | processRequestRelease (RTI::ObjectHandle id, const RTI::AttributeHandleSet &attrs, const char *tag) |
| Process RTI's requestAttributeOwnershipRelease service. | |
| virtual void | processConfirmAcquisitionCancellation (RTI::ObjectHandle id, const RTI::AttributeHandleSet &attrs) |
| Process RTI's conformAttributeOwnershipAcquisitionCancellation service. | |
| virtual DtHlaObject * | registerHlaObject (RTI::ObjectClassHandle classHand, const char *name, const DtDDMRegionSet *regionSet=0) |
| Use this function instead of the RTI's version to create a new HLA object. | |
| virtual void | registerHlaObjectWithRegion (RTI::ObjectClassHandle classHand, const char *name, const DtDDMRegionSet ®ionSet, RTI::ObjectHandle &id) |
| virtual void | deleteHlaObject (RTI::ObjectHandle objHand) |
| Use this function instead of the RTI's version to delete an HLA object. | |
| virtual void | setRegionsForRegister (int numAttrs, RTI::AttributeHandle *attrs, RTI::Region **regions) |
| By calling setRegionsForRegister, you are telling VR-Link that until you call setRegionsForRegister again (or call setNoRegionsForRegister), VR-Link should use the DDM version of registerObjectInstance whenever it registers an object for you. | |
| virtual void | setNoRegionsForRegister () |
Protected Member Functions | |
| DtHlaObjectManager (const DtHlaObjectManager &orig) | |
| Note: The copy constructor and assignment operator are protected because there should only be one object manager per exercise connection. | |
| DtHlaObjectManager & | operator= (const DtHlaObjectManager &orig) |
| assignment operator – Not Implemented | |
| virtual void | objectProcessRemoveObject (DtHlaObject *hlaObj) |
| Call DtHlaObject::processRemoveObject(). | |
| virtual void | objectProcessReflect (DtHlaObject *hlaObj, const DtStateMsg &msg) |
| Call DtHlaObject::callReflect(). | |
| virtual DtHlaObject * | addKnownObject (RTI::ObjectHandle id, RTI::ObjectClassHandle hand, const char *name, bool reflecting) |
| Call whenever a new object has been registered or discovered. | |
| virtual void | removeKnownObject (DtHlaObject *hlaObj) |
| Call whenever an object is to be deleted, either by delete, or remove. | |
| virtual void | removeAllObjects () |
| Called by destructor to remove and delete all DtHlaObjects. | |
| virtual DtList * | discoverCbList (RTI::ObjectClassHandle handle) |
| Returns the list of discover callbacks registered for a particular object class. | |
Protected Attributes | |
| DtHashlist | myDiscoverCbLists |
| DtHashlist that maps object class handles (DtIntHashKeys) to pointers to DtLists of callback functions. | |
| DtHlaObjectFactory * | myFactory |
| DtObjectIdHashlist | myObjectList |
| List of all known DtHlaObjects (by id). | |
| DtHashlist | myObjectListByName |
| List of all known DtHlaObjects (by String). | |
| DtObjectIdHashlist | myRegObjectList |
| List of all DtHlaObjects that we've registered locally. | |
| DtObjectIdHashlist | myDiscObjectList |
| List of all DtHlaObjects that we've discovered, possibly including local objects that we are also reflecting. | |
| DtExerciseConn * | myExConn |
| RTI::AttributeHandle * | myAttrsForDDMRegister |
| JIMK REVISIT – DDM. | |
| RTI::Region ** | myRegionsForDDMRegister |
| int | myNumAttrsForDDMRegister |
class DtHlaObjectManager:
Instances of DtHlaObjectManager are used to manage the set of HLA objects known to the federate.
| DtHlaObjectManager::DtHlaObjectManager | ( | DtHlaObjectFactory * | factory, |
| DtExerciseConn * | conn | ||
| ) |
Constructor.
|
virtual |
Destructor.
|
protected |
Note: The copy constructor and assignment operator are protected because there should only be one object manager per exercise connection.
These should not be called. copy constructor – Not Implemented
|
virtual |
Add/remove a callback to be called when an object which meets the federate's subscription criteria is discovered.
|
protectedvirtual |
Call whenever a new object has been registered or discovered.
It creates a DtHlaObject, adds it to the set of managed objects, and returns it.
|
virtual |
Add/remove a callback to be called when an object has been removed from the federation or no longer meets the interest criteria of the federate.
|
inlinevirtual |
Get the list of all HLA objects known to the federate.
References DtObjectIdHashlist::list(), and myObjectList.
|
virtual |
Use this function instead of the RTI's version to delete an HLA object.
This function calls RTI's deleteObjectInstance. You should have ownership of the priviledgeToDelete for this object before calling.
|
protectedvirtual |
Returns the list of discover callbacks registered for a particular object class.
|
inlinevirtual |
Get the list of all HLA objects discovered by the federate.
References DtObjectIdHashlist::list(), and myDiscObjectList.
|
virtual |
Get the HLA object based on its identifier.
|
virtual |
Get the HLA object based on its name.
|
virtual |
Called when the local subscription information changes.
As a result, we call localSubscriptionChanged for all DtHlaObjects that may be affected.
|
protectedvirtual |
Call DtHlaObject::callReflect().
Provides friendship towards DtHlaObject to derived classes.
|
protectedvirtual |
Call DtHlaObject::processRemoveObject().
Provides friendship towards DtHlaObject to derived classes.
|
protected |
assignment operator – Not Implemented
|
virtual |
Process RTI's attributeOwnershipAcquisitionNotification service.
|
virtual |
Process RTI's attributeOwnershipDivestitureNotification service.
|
virtual |
Process RTI's conformAttributeOwnershipAcquisitionCancellation service.
|
virtual |
Process the discovery of an object.
Creates the object, sets it up for reflecting, and calls discover callbacks. Called on real discovers. Returns the added instance.
|
virtual |
This form of processDiscoverObject takes the additional argument registeringFederate, indicating the Federate Handle of the federate that registered the object.
This form of processDiscoverObject is called in HLA Evolved Returns the added instance.
|
virtual |
Same as above, but takes an existing DtHlaObject.
Called on real discovers and when discovering objects that we register locally, if reflecting is on. returns the instance.
|
virtual |
When we are reflecting local data, this function is called to let the object manager know that we have locally requested updates for a class/set of attributes.
As a result, we will call processProvideUpdate for all relevant objects.
|
virtual |
Process RTI's provideUpdate service.
|
virtual |
Process an update message.
|
virtual |
Process the removal of an object.
Cleans up the object from reflecting. Called on real removals.
|
virtual |
Same as above, but takes an existing DtHlaObject.
Called on real removals, and on removals from the discovered list of objects that we are deleting locally, if reflecting is on.
|
virtual |
Process RTI's requestAttributeOwnershipAssumption service.
|
virtual |
Process RTI's requestAttributeOwnershipRelease service.
|
virtual |
Called when the local publication information changes.
As a result, we call publicationChanged for all DtHlaObjects that may be affected.
|
inlinevirtual |
Get the list of all HLA objects registered by the federate.
References DtObjectIdHashlist::list(), and myRegObjectList.
|
virtual |
Use this function instead of the RTI's version to create a new HLA object.
This function calls RTI's registerObjectInstance.
|
virtual |
|
protectedvirtual |
Called by destructor to remove and delete all DtHlaObjects.
|
virtual |
|
protectedvirtual |
Call whenever an object is to be deleted, either by delete, or remove.
It removes hlaObj from the set of managed objects, and deletes it.
|
virtual |
|
virtual |
|
virtual |
By calling setRegionsForRegister, you are telling VR-Link that until you call setRegionsForRegister again (or call setNoRegionsForRegister), VR-Link should use the DDM version of registerObjectInstance whenever it registers an object for you.
The specified arguments will be passed to the RTI. (VR-Link typically registers an object from within a DtObjectPublisher constructor). In order to restore VR-Link back to the default state, when registers are done with the non-DDM version of registerObjectInstance, call setNoRegionsForRegister. attrs is an array of numAttrs attribute handles, regions is an array of numAttrs pointers to RTI::regions. The lifetime of the arrays must extend through the time that the register occurs. Deletion of the arrays is the caller's responsibility. JIMK REVISIT – implement DDM
|
protected |
JIMK REVISIT – DDM.
|
protected |
List of all DtHlaObjects that we've discovered, possibly including local objects that we are also reflecting.
Referenced by discoveredObjects().
|
protected |
DtHashlist that maps object class handles (DtIntHashKeys) to pointers to DtLists of callback functions.
|
protected |
|
protected |
|
protected |
|
protected |
List of all known DtHlaObjects (by id).
Referenced by allHlaObjects().
|
protected |
List of all known DtHlaObjects (by String).
|
protected |
|
protected |
List of all DtHlaObjects that we've registered locally.
Referenced by registeredObjects().