VR-Link API Documentation for DIS
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtReflectedObjectList Class Reference

Instances of DtReflectedObjectList are lists of instances of classes derived from DtReflectedObject. More...

+ Inheritance diagram for DtReflectedObjectList:
+ Collaboration diagram for DtReflectedObjectList:

List of all members.

Public Member Functions

 DtReflectedObjectList (DtExerciseConn *exConn)
 Constructor.
virtual ~DtReflectedObjectList ()
 destructor Warning: makes non-virtual call to removeAndDelete
virtual DtReflectedObjectfirstObj () const
 Get the first/last object in the list.
virtual DtReflectedObjectlastObj () const
virtual int count () const
 Get number of objects.
virtual DtReflectedObjectlookupObj (const DtBaseHashKey &key) const
 Search for an object.
virtual DtExerciseConnexerciseConn () const
 Get my exerciseConn.
virtual void addObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Object added callback registration/deregistration.
virtual void removeObjectAdditionCallback (DtReflectedObjectCallbackFunction cb, void *userData)
virtual void addObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
 Object removed callback registration/deregistration.
virtual void removeObjectRemovalCallback (DtReflectedObjectCallbackFunction cb, void *userData)
virtual void print () const
 Print the SRs of all objects.
virtual void setTimeoutProcessing (bool onOff)
 Set whether or not timeout processing occurs.
virtual void setTimeoutInterval (DtTime time)
 Set/Get the remote object timeout period.
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.
virtual void clearDiscoveryCondition ()
 Unregisters the checker function set in setDiscoverCondition.

Protected Member Functions

 DtReflectedObjectList (const DtReflectedObjectList &orig)
 copy constructor -- not implemented
DtReflectedObjectListoperator= (const DtReflectedObjectList &orig)
 assignment operator -- not implemented
virtual DtReflectedObjectnewReflectedObj (const DtStateMsg &msg)=0
 Create a new object from a state message.
virtual DtReflectedObjectprocessStateMessage (const DtStateMsg &msg)
 Process an incoming state message.
virtual void doTimeouts ()
 Remove any remote objects which have not been updated during the timeout period.
virtual void removeAndDelete (DtReflectedObject *obj, char *msg=NULL)
 Remove the remote object from the list if found and delete it.
virtual void objectAdded (DtReflectedObject *object)
 Called after a remote object has been added to the list.
virtual bool shouldBeTimedOut (DtReflectedObject *object)
 Returns whether or not the object should be timed out.
void emptyLists ()
 Empty the object list and the timeout list.
void emptyCallbackLists ()
virtual void processObjectAdditionCallbacks (DtReflectedObject *object)
 Process object addition/removal callbacks.
virtual void processObjectRemovalCallbacks (DtReflectedObject *object)
virtual const DtBaseHashKeyhashKeyFromStateMessage (const DtStateMsg *msg)=0
 Get a hash key from a state message.
virtual int acceptPdu (const DtStateMsg &) const
 Determines if a PDU should be processed or not.
virtual bool readyToAdd (DtReflectedObject *obj)
 Returns true if the obj is ready to be added to myObjectList; calls myDiscoveryCondition from within.

Static Protected Member Functions

static void doTimeoutsPostDrainCb (void *usr)
 Calls doTimeouts.

Protected Attributes

DtExerciseConnmyExConn
DtIntrusiveList myObjectAddedCallbacks
DtIntrusiveList myObjectRemovedCallbacks
DtIntrusiveList myObjectList
DtIntrusiveList myWaitList
DtHashlist myObjectHashlist
DtHashlist myWaitHashlist
DtTime myTimeoutInterval
bool myTimeoutProcessingFlag
DtDiscoveryCondition myDiscoveryCondition
void * myDiscoveryConditionParameter

Detailed Description

Instances of DtReflectedObjectList are lists of instances of classes derived from DtReflectedObject.

A DtReflectedObjectList manages the comings and goings of its reflected objects based on discoveries and removes received from the exercise connection.


Constructor & Destructor Documentation

Constructor.

destructor Warning: makes non-virtual call to removeAndDelete

copy constructor -- not implemented


Member Function Documentation

virtual int DtReflectedObjectList::acceptPdu ( const DtStateMsg ) const [protected, virtual]

Determines if a PDU should be processed or not.

Right now, this function returns 1.

Reimplemented in DtReflectedDesignatorList.

virtual void DtReflectedObjectList::addObjectAdditionCallback ( DtReflectedObjectCallbackFunction  cb,
void *  userData 
) [virtual]

Object added callback registration/deregistration.

virtual void DtReflectedObjectList::addObjectRemovalCallback ( DtReflectedObjectCallbackFunction  cb,
void *  userData 
) [virtual]

Object removed callback registration/deregistration.

Unregisters the checker function set in setDiscoverCondition.

If there is none set, this has no effect.

virtual int DtReflectedObjectList::count ( ) const [virtual]

Get number of objects.

virtual void DtReflectedObjectList::doTimeouts ( ) [protected, virtual]

Remove any remote objects which have not been updated during the timeout period.

Gets called automatically by a postDrainCallback registered by the constructor. Users should not need to call this.

static void DtReflectedObjectList::doTimeoutsPostDrainCb ( void *  usr) [static, protected]

Calls doTimeouts.

void DtReflectedObjectList::emptyLists ( ) [protected]

Empty the object list and the timeout list.

Non-virtual since meant to be called from destructor. Warning: makes non-virtual call to removeAndDelete

Get my exerciseConn.

virtual DtReflectedObject* DtReflectedObjectList::firstObj ( ) const [virtual]

Get the first/last object in the list.

virtual const DtBaseHashKey& DtReflectedObjectList::hashKeyFromStateMessage ( const DtStateMsg msg) [protected, pure virtual]
virtual DtReflectedObject* DtReflectedObjectList::lastObj ( ) const [virtual]
virtual DtReflectedObject* DtReflectedObjectList::lookupObj ( const DtBaseHashKey key) const [virtual]

Search for an object.

virtual DtReflectedObject* DtReflectedObjectList::newReflectedObj ( const DtStateMsg msg) [protected, pure virtual]
virtual void DtReflectedObjectList::objectAdded ( DtReflectedObject object) [protected, virtual]

Called after a remote object has been added to the list.

Defaults to do nothing. Subclasses can override this function to add functionality on addition.

Reimplemented in DtReflectedEntityList, DtReflectedEmitterSystemList, DtReflectedIffList, DtReflectedDesignatorList, DtReflectedAggregateList, DtReflectedGriddedDataList, DtReflectedRadioTransmitterList, DtReflectedEnvironmentProcessList, and DtReflectedRadioReceiverList.

DtReflectedObjectList& DtReflectedObjectList::operator= ( const DtReflectedObjectList orig) [protected]

assignment operator -- not implemented

virtual void DtReflectedObjectList::print ( ) const [virtual]

Print the SRs of all objects.

Reimplemented in DtReflectedDesignatorList.

virtual void DtReflectedObjectList::processObjectAdditionCallbacks ( DtReflectedObject object) [protected, virtual]

Process object addition/removal callbacks.

virtual void DtReflectedObjectList::processObjectRemovalCallbacks ( DtReflectedObject object) [protected, virtual]
virtual DtReflectedObject* DtReflectedObjectList::processStateMessage ( const DtStateMsg msg) [protected, virtual]
virtual bool DtReflectedObjectList::readyToAdd ( DtReflectedObject obj) [protected, virtual]

Returns true if the obj is ready to be added to myObjectList; calls myDiscoveryCondition from within.

virtual void DtReflectedObjectList::removeAndDelete ( DtReflectedObject obj,
char *  msg = NULL 
) [protected, virtual]

Remove the remote object from the list if found and delete it.

Prints a message on deletion if specified.

Reimplemented in DtReflectedDesignatorList.

virtual void DtReflectedObjectList::removeObjectAdditionCallback ( DtReflectedObjectCallbackFunction  cb,
void *  userData 
) [virtual]
virtual void DtReflectedObjectList::removeObjectRemovalCallback ( DtReflectedObjectCallbackFunction  cb,
void *  userData 
) [virtual]
virtual void DtReflectedObjectList::setDiscoveryCondition ( DtDiscoveryCondition  fn,
void *  usr 
) [virtual]

Set the checker function which will determine when an object gets discovered and put into the ref.

obj. list.

virtual void DtReflectedObjectList::setTimeoutInterval ( DtTime  time) [virtual]

Set/Get the remote object timeout period.

virtual void DtReflectedObjectList::setTimeoutProcessing ( bool  onOff) [virtual]

Set whether or not timeout processing occurs.

Defaults to On.

virtual bool DtReflectedObjectList::shouldBeTimedOut ( DtReflectedObject object) [protected, virtual]

Returns whether or not the object should be timed out.

Assumes that timeout processing is enabled.


Member Data Documentation


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)