![]() |
VR-Link API Documentation for HLA 1516
|
Instances of DtReflectedEntityList are used to manage remote entities from the network. More...
Inheritance diagram for DtReflectedEntityList:
Collaboration diagram for DtReflectedEntityList:Public Member Functions | |
| DtReflectedEntityList (DtExerciseConn *exConn, bool smoothCapable=false, const DtDDMRegionSet *regionSetToUse=0) | |
| Constructor that uses subscription criteria from the exConn's fomMapper. | |
| DtReflectedEntityList (DtExerciseConn *exConn, const DtString &updateRateTag, bool smoothCapable=false, const DtDDMRegionSet *regionSetToUse=0) | |
| DtReflectedEntityList (DtExerciseConn *exConn, const DtList *handleList, bool smoothCapable=false, const DtDDMRegionSet *regionSetToUse=0) | |
| Constructor that uses a handle list as subscription criteria. | |
| DtReflectedEntityList (DtExerciseConn *exConn, const DtList *handleList, const DtString &updateRateTag, bool smoothCapable=false, const DtDDMRegionSet *regionSetToUse=0) | |
| virtual | ~DtReflectedEntityList () |
| Destructor. | |
| virtual DtReflectedEntity * | lookup (RTI::ObjectInstanceHandle id) |
| Look up entity by object handle. | |
| virtual DtReflectedEntity * | lookup (const DtGlobalObjectDesignator &objName) |
| Look up entity by name. | |
| virtual DtReflectedEntity * | lookup (const DtEntityIdentifier &entityId) |
| Look up entity by entityId. | |
| virtual DtReflectedEntity * | first () const |
| Get the first entity in the list. | |
| virtual DtReflectedEntity * | last () const |
| Get the last entity in the list. | |
| virtual void | addToObjectList (DtReflectedObject *refObj) |
| Adds an object the the list. | |
| virtual void | addToEntityIdentifierHashList (DtReflectedEntity *ent) |
| Adds the entity id of ent to myEntityIdentifierHashlist. | |
| virtual void | addEntityAdditionCallback (DtEntityCallbackFunction cb, void *userData) |
| Entity added callback registration. | |
| virtual void | removeEntityAdditionCallback (DtEntityCallbackFunction cb, void *userData) |
| Entity added callback deregistration. | |
| virtual void | addEntityRemovalCallback (DtEntityCallbackFunction cb, void *userData) |
| Entity removed callback registration. | |
| virtual void | removeEntityRemovalCallback (DtEntityCallbackFunction cb, void *userData) |
| Entity removed callback deregistration. | |
| virtual void | discoverOnlyWhenEntityTypeKnown (bool yesNo) |
| Allows one to specify whether discover should delayed until the entity type is known before adding the entity to the list. | |
Protected Member Functions | |
| virtual const DtList * | dfltHandleList () |
| Returns the list of handles that the FOM Mapper associates with a DtReflectedEntityList. | |
| virtual DtReflectedObject * | newReflectedObject (DtHlaObject *obj) const |
| Override of the virtual function in DtReflectedObjectList. | |
| virtual DtReflectedEntity * | newReflectedEntity (DtHlaObject *obj) const |
| Create a remote entity object for the HLA object. | |
| virtual void | removeAndDelete (DtReflectedObject *object, char *msg) |
| Override of the virtual function in DtReflectedObjectList. | |
| virtual void | removeAndDelete (DtReflectedEntity *entity, char *msg=NULL) |
| Default calls down to base class version, but can be overridden. | |
| virtual void | objectAdded (DtReflectedObject *obj) |
| Called from processDiscoverObject() after a remote entity has been added to the list. | |
| virtual void | entityAdded (DtReflectedEntity *ent) |
| Called by objectAdded (which is called from processDiscoverObject()) after a remote entity has been added to the list. | |
Static Protected Member Functions | |
| static bool | checkEntityType (DtReflectedObject *obj, void *usr) |
| Callback which checks whether the entity type has arrived yet. | |
| static void | checkEntityId (DtReflectedEntity *ent, void *usr) |
| Callback which checks whether the entity id of the entity has arrived yet. | |
Protected Attributes | |
| bool | mySmoothCapable |
| Determines whether to use smoothing for reflected entities. | |
| DtHashlist | myEntityIdentifierHashlist |
| Hash list used for lookup of entity identifiers. | |
Private Member Functions | |
| DtReflectedEntityList (const DtReflectedEntityList &orig) | |
| Copy constructor -- not implemented. | |
| DtReflectedEntityList & | operator= (const DtReflectedEntityList &orig) |
| Assignment operator -- not implemented. | |
Instances of DtReflectedEntityList are used to manage remote entities from the network.
DtReflectedEntityList, when instantiated, subscribes to all of the classes either specified by the FOM Mapper used by the DtExerciseConn or provided in the form of Object Class Handles. When an object of type handled by DtReflectedEntityList is discovered, a DtReflectedEntity is created and added to the list. DtReflectedEntityList provides a mechanism to maintain the list of remote entities and their data. In addition, DtReflectedEntityList provides callback mechanisms that the user may register for, so that the user may be notified and do certain processing when an entity is added/removed from the reflected entity list.
| DtReflectedEntityList::DtReflectedEntityList | ( | DtExerciseConn * | exConn, |
| bool | smoothCapable = false, |
||
| const DtDDMRegionSet * | regionSetToUse = 0 |
||
| ) |
Constructor that uses subscription criteria from the exConn's fomMapper.
This constructor determines what entity classes to subscribe to by obtaining them from the exConn's fomMapper.
| smoothCapable | If smoothCapable is set to true, any reflected entity maintained by this list will use a smoother. |
| DtReflectedEntityList::DtReflectedEntityList | ( | DtExerciseConn * | exConn, |
| const DtString & | updateRateTag, | ||
| bool | smoothCapable = false, |
||
| const DtDDMRegionSet * | regionSetToUse = 0 |
||
| ) |
| DtReflectedEntityList::DtReflectedEntityList | ( | DtExerciseConn * | exConn, |
| const DtList * | handleList, | ||
| bool | smoothCapable = false, |
||
| const DtDDMRegionSet * | regionSetToUse = 0 |
||
| ) |
Constructor that uses a handle list as subscription criteria.
This constructor determines what entity classes to subscribe to by obtaining them from the handle list.
| handleList | is a list of RTI::ObjectClassHandle's that specifies what classes to subscribe to. |
| smoothCapable | If smoothCapable is set to true, any reflected entity maintained by this list will use a smoother. |
| DtReflectedEntityList::DtReflectedEntityList | ( | DtExerciseConn * | exConn, |
| const DtList * | handleList, | ||
| const DtString & | updateRateTag, | ||
| bool | smoothCapable = false, |
||
| const DtDDMRegionSet * | regionSetToUse = 0 |
||
| ) |
| virtual DtReflectedEntityList::~DtReflectedEntityList | ( | ) | [virtual] |
Destructor.
| DtReflectedEntityList::DtReflectedEntityList | ( | const DtReflectedEntityList & | orig | ) | [private] |
Copy constructor -- not implemented.
| virtual void DtReflectedEntityList::addEntityAdditionCallback | ( | DtEntityCallbackFunction | cb, |
| void * | userData | ||
| ) | [virtual] |
Entity added callback registration.
Allows the user to specify a function to be called when an entity is discovered and added to the list.
| virtual void DtReflectedEntityList::addEntityRemovalCallback | ( | DtEntityCallbackFunction | cb, |
| void * | userData | ||
| ) | [virtual] |
Entity removed callback registration.
Allows the user to specify a function to be called when and entity is removed from the list.
| virtual void DtReflectedEntityList::addToEntityIdentifierHashList | ( | DtReflectedEntity * | ent | ) | [virtual] |
Adds the entity id of ent to myEntityIdentifierHashlist.
This is called by checkEntityId, and needs to be public so that it can be called by the callback.
| virtual void DtReflectedEntityList::addToObjectList | ( | DtReflectedObject * | refObj | ) | [virtual] |
Adds an object the the list.
Override DtReflectedObjectList::addToObjectList() (which it calls down to) to add entities to the entity identifier hash list
Reimplemented from DtReflectedObjectList.
| static void DtReflectedEntityList::checkEntityId | ( | DtReflectedEntity * | ent, |
| void * | usr | ||
| ) | [static, protected] |
Callback which checks whether the entity id of the entity has arrived yet.
If it has, the entity id is added to myEntityIdentifierHashlist to be used for lookup purposes, and the callback is deregistered. Registered addToObjectList().
| static bool DtReflectedEntityList::checkEntityType | ( | DtReflectedObject * | obj, |
| void * | usr | ||
| ) | [static, protected] |
Callback which checks whether the entity type has arrived yet.
This callback is registered/deregistered using the function: discoverOnlyWhenEntityTypeKnown()
| virtual const DtList* DtReflectedEntityList::dfltHandleList | ( | ) | [protected, virtual] |
Returns the list of handles that the FOM Mapper associates with a DtReflectedEntityList.
Uses the FOM Mapper of the DtExerciseConn that is passed in through the constructor.
| virtual void DtReflectedEntityList::discoverOnlyWhenEntityTypeKnown | ( | bool | yesNo | ) | [virtual] |
Allows one to specify whether discover should delayed until the entity type is known before adding the entity to the list.
The default value is no, meaning entities will get added to the list immediately -- regardless of whether it has received any attr values or not.
| virtual void DtReflectedEntityList::entityAdded | ( | DtReflectedEntity * | ent | ) | [protected, virtual] |
Called by objectAdded (which is called from processDiscoverObject()) after a remote entity has been added to the list.
Default implementation prints a message. Subclasses can override this function to add functionality on entity addition.
| virtual DtReflectedEntity* DtReflectedEntityList::first | ( | ) | const [virtual] |
Get the first entity in the list.
| virtual DtReflectedEntity* DtReflectedEntityList::last | ( | ) | const [virtual] |
Get the last entity in the list.
| virtual DtReflectedEntity* DtReflectedEntityList::lookup | ( | RTI::ObjectInstanceHandle | id | ) | [virtual] |
Look up entity by object handle.
| virtual DtReflectedEntity* DtReflectedEntityList::lookup | ( | const DtGlobalObjectDesignator & | objName | ) | [virtual] |
Look up entity by name.
| virtual DtReflectedEntity* DtReflectedEntityList::lookup | ( | const DtEntityIdentifier & | entityId | ) | [virtual] |
Look up entity by entityId.
| virtual DtReflectedEntity* DtReflectedEntityList::newReflectedEntity | ( | DtHlaObject * | obj | ) | const [protected, virtual] |
Create a remote entity object for the HLA object.
Caller is responsible for deletion.
| virtual DtReflectedObject* DtReflectedEntityList::newReflectedObject | ( | DtHlaObject * | obj | ) | const [protected, virtual] |
Override of the virtual function in DtReflectedObjectList.
newReflectedObject calls newReflectedEntity.
Implements DtReflectedObjectList.
| virtual void DtReflectedEntityList::objectAdded | ( | DtReflectedObject * | obj | ) | [protected, virtual] |
Called from processDiscoverObject() after a remote entity has been added to the list.
Calls entityAdded.
Reimplemented from DtReflectedObjectList.
| DtReflectedEntityList& DtReflectedEntityList::operator= | ( | const DtReflectedEntityList & | orig | ) | [private] |
Assignment operator -- not implemented.
| virtual void DtReflectedEntityList::removeAndDelete | ( | DtReflectedObject * | object, |
| char * | msg | ||
| ) | [protected, virtual] |
Override of the virtual function in DtReflectedObjectList.
Calls removeAndDelete(DtReflectedEntity*....)
Reimplemented from DtReflectedObjectList.
| virtual void DtReflectedEntityList::removeAndDelete | ( | DtReflectedEntity * | entity, |
| char * | msg = NULL |
||
| ) | [protected, virtual] |
Default calls down to base class version, but can be overridden.
| msg | If msg is specified, msg is printed to DtInfo with the object handle of the object deleted |
| virtual void DtReflectedEntityList::removeEntityAdditionCallback | ( | DtEntityCallbackFunction | cb, |
| void * | userData | ||
| ) | [virtual] |
Entity added callback deregistration.
Allows the user to remove the callback function that is called when an entity is discovered and added to the list.
| virtual void DtReflectedEntityList::removeEntityRemovalCallback | ( | DtEntityCallbackFunction | cb, |
| void * | userData | ||
| ) | [virtual] |
Entity removed callback deregistration.
Allows the user to remove the callback function that is called when an entity is removed from the list.
Hash list used for lookup of entity identifiers.
bool DtReflectedEntityList::mySmoothCapable [protected] |
Determines whether to use smoothing for reflected entities.