VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtReflectedDesignatorList Class Reference

Instances of this class provide a protocol independent interface to a list of reflected designators in a DIS environment. More...

+ Inheritance diagram for DtReflectedDesignatorList:
+ Collaboration diagram for DtReflectedDesignatorList:

Public Member Functions

 DtReflectedDesignatorList (DtExerciseConn *exConn, int numBucketsPrimeNumber=503)
 Constructor. More...
 
virtual ~DtReflectedDesignatorList ()
 Destructor. More...
 
virtual DtReflectedDesignator * lookup (const DtGlobalObjectDesignator &designatingEntity, DtDesignatorCodeName designatorCodeName) const
 Lookup a designator from the object ID of its designating entity and its designator code name. More...
 
virtual DtReflectedDesignator * first () const
 Get the first and last elements of the reflected designators' list. More...
 
virtual DtReflectedDesignator * last () const
 
virtual void addDesignatorAdditionCallback (DtDesignatorCallbackFunction cb, void *userData)
 "Designator Added" callback registration/deregistration. More...
 
virtual void removeDesignatorAdditionCallback (DtDesignatorCallbackFunction cb, void *userData)
 
virtual void addDesignatorRemovalCallback (DtDesignatorCallbackFunction cb, void *userData)
 "Designator Removed" callback registration/deregistration. More...
 
virtual void removeDesignatorRemovalCallback (DtDesignatorCallbackFunction cb, void *userData)
 
virtual void print () const
 Print the SRs of all reflected designators. More...
 
virtual void printDataToStream (std::ostream &stream) const
 Print the SRs to a stream. More...
 
- Public Member Functions inherited from DtReflectedObjectList
 DtReflectedObjectList (DtExerciseConn *exConn, int numBucketsPrimeNumber=503)
 Constructor. More...
 
virtual ~DtReflectedObjectList ()
 destructor Warning: makes non-virtual call to removeAndDelete More...
 
virtual void initializeAttributePduKindsOfInterest (const std::set< DtPduKind > &pduKinds)
 This initializes which PDU kinds will be processed when receiving an Attribute PDU. More...
 
virtual DtReflectedObject * firstObj () const
 Get the first/last object in the list. More...
 
virtual DtReflectedObject * lastObj () const
 
virtual int count () const
 Get number of objects. More...
 
virtual DtReflectedObject * lookupObj (const DtBaseHashKey &key) const
 Search for an object. More...
 
virtual DtExerciseConn * exerciseConn () const
 Get my exerciseConn. More...
 
virtual void addObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Object added callback registration/deregistration. More...
 
virtual void removeObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 
virtual void addObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Object removed callback registration/deregistration. More...
 
virtual void removeObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 
virtual void setTimeoutProcessing (bool onOff)
 Set whether or not timeout processing occurs. More...
 
virtual void setTimeoutInterval (DtTime time)
 Set/Get the remote object timeout period. More...
 
virtual DtTime timeoutInterval ()
 
virtual void setDiscoveryCondition (DtDiscoveryCondition fn, void *usr)
 Set the checker function which will determine when an object gets discovered and put into the ref. More...
 
virtual void clearDiscoveryCondition ()
 Unregisters the checker function set in setDiscoverCondition. More...
 
virtual void removeObject (DtReflectedObject *obj)
 This is the same as removeAndDelete, it exists to maintain equality with HLA objects. More...
 
virtual DtTime timeoutCheckInterval () const
 
virtual void setTimeoutCheckInterval (DtTime interval)
 
virtual void addWaitlistAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Callback registration for when objects are added or removed from the waitlist. More...
 
virtual void removeWaitlistAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 
virtual void addWaitlistRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Waitlist removed callback registration/deregistration. More...
 
virtual void removeWaitlistRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 

Protected Member Functions

virtual DtReflectedObject * newReflectedObj (const DtStateMsg &msg)
 Overrides the base class implementation. Always returns NULL. More...
 
virtual DtReflectedDesignator * newReflectedDesignator (const DtEntityIdentifier &designatingEntity, DtDesignatorCodeName designatorCodeName)
 Creates a new reflected designator. More...
 
virtual int acceptPdu (const DtStateMsg &msg) const
 Overrides the base class implementation. More...
 
virtual DtReflectedObject * processStateMessage (const DtStateMsg &msg)
 Overrides the base class implementation. Processes a Designator Pdu. More...
 
virtual void removeAndDelete (DtReflectedObject *obj, const char *msg=0)
 Print message 'msg' and execute the registered "ObjectRemoval" callbacks. More...
 
virtual void objectAdded (DtReflectedObject *obj)
 Called after a reflected designator is added to the list and before addition callbacks are processed. More...
 
const DtBaseHashKey & hashKeyFromStateMessage (const DtStateMsg *)
 Overrides the base class implementation. More...
 
 DtReflectedDesignatorList (const DtReflectedDesignatorList &)
 Copy constructor – Not Implemented. More...
 
DtReflectedDesignatorList & operator= (const DtReflectedDesignatorList &)
 Assignment operator – Not Implemented. More...
 
- Protected Member Functions inherited from DtReflectedObjectList
virtual void doTimeouts ()
 Remove any remote objects which have not been updated during the timeout period. More...
 
virtual bool shouldBeTimedOut (DtReflectedObject *object)
 Returns whether or not the object should be timed out. More...
 
void emptyLists ()
 Empty the object list and the timeout list. More...
 
void emptyCallbackLists ()
 
virtual void processObjectAdditionCallbacks (DtReflectedObject *object)
 Process object addition/removal callbacks. More...
 
virtual void processObjectRemovalCallbacks (DtReflectedObject *object)
 
virtual void processWaitlistAdditionCallbacks (DtReflectedObject *object)
 Process waitlist addition/removal callbacks. More...
 
virtual void processWaitlistRemovalCallbacks (DtReflectedObject *object)
 
virtual DtBaseHashKey * hashKeyFromAttributeRecordSet (const DtAttributeRecordSet &recordSet)
 Get a hash key from an attribute record set. More...
 
virtual bool readyToAdd (DtReflectedObject *obj)
 Returns true if the obj is ready to be added to myObjectList; calls myDiscoveryCondition from within. More...
 
virtual void processAttributePduCb (DtAttributeInteraction *inter)
 
virtual void processAttributePduRecordSet (const DtAttributeRecordSet &recordSet, const DtSimulationAddress &simAddr, DtReflectedObject *obj=0)
 
virtual void processAttributePduWaitListCb (DtReflectedObject *obj)
 
virtual void deleteRecordSetBySimulationAddressMap (DtRecordSetBySimulationAddressMap &recordSetMap, const DtSimulationAddress &simAddr=DtSimulationAddress()) const
 

Static Protected Member Functions

static void designatorCb (DtDesignatorPdu *pdu, void *usr)
 Callback for the exercise connection. More...
 
- Static Protected Member Functions inherited from DtReflectedObjectList
static void doTimeoutsPostDrainCb (void *usr)
 Calls doTimeouts. More...
 
static void processAttributePduCb (DtAttributeInteraction *inter, void *usr)
 
static void processAttributePduWaitListCb (DtReflectedObject *obj, void *userData)
 

Protected Attributes

DtSystemHashKey myHashKey
 
- Protected Attributes inherited from DtReflectedObjectList
DtExerciseConn * myExConn
 
DtIntrusiveList myObjectAddedCallbacks
 
DtIntrusiveList myObjectRemovedCallbacks
 
DtIntrusiveList myWaitlistAddedCallbacks
 
DtIntrusiveList myWaitlistRemovedCallbacks
 
DtIntrusiveList myObjectList
 
DtIntrusiveList myWaitList
 
DtHashlist myObjectHashlist
 
DtHashlist myWaitHashlist
 
DtAttributesByObjectIdMap myAttributeWaitHashlist
 
DtTime myTimeoutInterval
 
DtTime myNextTimeoutCheck
 
DtTime myTimeoutCheckInterval
 
bool myTimeoutProcessingFlag
 
DtDiscoveryCondition myDiscoveryCondition
 
void * myDiscoveryConditionParameter
 
std::set< DtPduKind > myPduKindSet
 

Detailed Description

Instances of this class provide a protocol independent interface to a list of reflected designators in a DIS environment.

Constructor & Destructor Documentation

DtReflectedDesignatorList::DtReflectedDesignatorList ( DtExerciseConn *  exConn,
int  numBucketsPrimeNumber = 503 
)

Constructor.

virtual DtReflectedDesignatorList::~DtReflectedDesignatorList ( )
virtual

Destructor.

DtReflectedDesignatorList::DtReflectedDesignatorList ( const DtReflectedDesignatorList &  )
protected

Copy constructor – Not Implemented.

Member Function Documentation

virtual int DtReflectedDesignatorList::acceptPdu ( const DtStateMsg &  msg) const
protectedvirtual

Overrides the base class implementation.

Determines if a PDU should be processed or not. Always returns 1.

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedDesignatorList::addDesignatorAdditionCallback ( DtDesignatorCallbackFunction  cb,
void *  userData 
)
virtual

"Designator Added" callback registration/deregistration.

virtual void DtReflectedDesignatorList::addDesignatorRemovalCallback ( DtDesignatorCallbackFunction  cb,
void *  userData 
)
virtual

"Designator Removed" callback registration/deregistration.

static void DtReflectedDesignatorList::designatorCb ( DtDesignatorPdu *  pdu,
void *  usr 
)
staticprotected

Callback for the exercise connection.

virtual DtReflectedDesignator* DtReflectedDesignatorList::first ( ) const
virtual

Get the first and last elements of the reflected designators' list.

const DtBaseHashKey& DtReflectedDesignatorList::hashKeyFromStateMessage ( const DtStateMsg *  )
protectedvirtual

Overrides the base class implementation.

Generates a corresponding key from a Designator Pdu. Returns an instance of 'DtSystemHashKey'. Note: the instance of the generated key is valid only until the next call to this method, or until the class instance itself goes out of scope (whichever is shorter).

Implements DtReflectedObjectList.

virtual DtReflectedDesignator* DtReflectedDesignatorList::last ( ) const
virtual
virtual DtReflectedDesignator* DtReflectedDesignatorList::lookup ( const DtGlobalObjectDesignator &  designatingEntity,
DtDesignatorCodeName  designatorCodeName 
) const
virtual

Lookup a designator from the object ID of its designating entity and its designator code name.

virtual DtReflectedDesignator* DtReflectedDesignatorList::newReflectedDesignator ( const DtEntityIdentifier &  designatingEntity,
DtDesignatorCodeName  designatorCodeName 
)
protectedvirtual

Creates a new reflected designator.

Called by processStateMessage(). Override this to change the creation of new DtReflectedDesignators.

virtual DtReflectedObject* DtReflectedDesignatorList::newReflectedObj ( const DtStateMsg &  msg)
protectedvirtual

Overrides the base class implementation. Always returns NULL.

Implements DtReflectedObjectList.

virtual void DtReflectedDesignatorList::objectAdded ( DtReflectedObject *  obj)
protectedvirtual

Called after a reflected designator is added to the list and before addition callbacks are processed.

Right now, it only calls DtInfo.

Reimplemented from DtReflectedObjectList.

DtReflectedDesignatorList& DtReflectedDesignatorList::operator= ( const DtReflectedDesignatorList &  )
protected

Assignment operator – Not Implemented.

virtual void DtReflectedDesignatorList::print ( ) const
virtual

Print the SRs of all reflected designators.

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedDesignatorList::printDataToStream ( std::ostream &  stream) const
virtual

Print the SRs to a stream.

virtual DtReflectedObject* DtReflectedDesignatorList::processStateMessage ( const DtStateMsg &  msg)
protectedvirtual

Overrides the base class implementation. Processes a Designator Pdu.

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedDesignatorList::removeAndDelete ( DtReflectedObject *  obj,
const char *  msg = 0 
)
protectedvirtual

Print message 'msg' and execute the registered "ObjectRemoval" callbacks.

Remove reflected object 'obj' from the "reflected designators" list. Note: Overrides the base class implementation

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedDesignatorList::removeDesignatorAdditionCallback ( DtDesignatorCallbackFunction  cb,
void *  userData 
)
virtual
virtual void DtReflectedDesignatorList::removeDesignatorRemovalCallback ( DtDesignatorCallbackFunction  cb,
void *  userData 
)
virtual

Member Data Documentation

DtSystemHashKey DtReflectedDesignatorList::myHashKey
protected

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

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)