VR-Link API Documentation for DIS
List of all members | Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions
DtReflectedAggregateList Class Reference

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

+ Inheritance diagram for DtReflectedAggregateList:
+ Collaboration diagram for DtReflectedAggregateList:

Public Member Functions

 DtReflectedAggregateList (DtExerciseConn *exConn, bool smoothCapable=false)
 Constructor.
virtual ~DtReflectedAggregateList ()
 Destructor.
virtual DtReflectedAggregatelookup (const DtObjectId &id) const
 Lookup an aggregate from its object ID.
virtual DtReflectedAggregatefirst () const
 Get the first and last elements of the aggregate list.
virtual DtReflectedAggregatelast () const
virtual void addAggregateAdditionCallback (DtAggregateCallbackFunction cb, void *userData)
 Aggregate added callback registration/deregistration.
virtual void removeAggregateAdditionCallback (DtAggregateCallbackFunction cb, void *userData)
virtual void addAggregateRemovalCallback (DtAggregateCallbackFunction cb, void *userData)
 Aggregate removed callback registration/deregistration.
virtual void removeAggregateRemovalCallback (DtAggregateCallbackFunction cb, void *userData)
virtual void print ()
 Print the SRs of all objects.
virtual DtReflectedAggregateprocessAggregateState (const DtAggregateStatePdu &pdu)
 Process an incoming aggregate state pdu.
virtual void processRelativeLocationPdu (const DtRelativeLocationPdu &pdu)
 Process an incoming relativeLocation pdu.
- Public Member Functions inherited from DtReflectedObjectList
 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

virtual DtReflectedObjectnewReflectedObj (const DtStateMsg &msg)
 Create a new object from a state message.
virtual DtReflectedObjectprocessStateMessage (const DtStateMsg &msg)
 Process an incoming state message.
virtual void objectAdded (DtReflectedObject *obj)
 Called after an aggregate is added and before additional callbacks are processed.
virtual const DtBaseHashKeyhashKeyFromStateMessage (const DtStateMsg *msg)
 Get a hash key from a state message.
virtual DtReflectedAggregatenewReflectedAggregate (const DtEntityIdentifier &id, const DtEntityType &type) const
 Create a new reflected aggregate.
virtual void aggregateAdded (DtReflectedAggregate *agg)
 Called after an aggregate is added and before additional callbacks are processed.
- Protected Member Functions inherited from DtReflectedObjectList
 DtReflectedObjectList (const DtReflectedObjectList &orig)
 copy constructor – not implemented
DtReflectedObjectListoperator= (const DtReflectedObjectList &orig)
 assignment operator – not implemented
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 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 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 aggregateStateCb (DtAggregateStatePdu *pdu, void *usr)
 Callback for the exercise connection.
static void relativeLocationCb (DtRelativeLocationPdu *pdu, void *usr)
 Callback which calls processRelativeLocationPdu.
- Static Protected Member Functions inherited from DtReflectedObjectList
static void doTimeoutsPostDrainCb (void *usr)
 Calls doTimeouts.

Protected Attributes

bool mySmoothCapable
DtEntityIdentifierHashKeymyHashKey
- Protected Attributes inherited from DtReflectedObjectList
DtExerciseConnmyExConn
DtIntrusiveList myObjectAddedCallbacks
DtIntrusiveList myObjectRemovedCallbacks
DtIntrusiveList myObjectList
DtIntrusiveList myWaitList
DtHashlist myObjectHashlist
DtHashlist myWaitHashlist
DtTime myTimeoutInterval
bool myTimeoutProcessingFlag
DtDiscoveryCondition myDiscoveryCondition
void * myDiscoveryConditionParameter

Private Member Functions

DtReflectedAggregateListoperator= (const DtReflectedAggregateList &orig)
 Assignment operator – not implemented.
 DtReflectedAggregateList (const DtReflectedAggregateList &orig)
 Copy constructor – not implemented.

Detailed Description

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

Constructor & Destructor Documentation

DtReflectedAggregateList::DtReflectedAggregateList ( DtExerciseConn exConn,
bool  smoothCapable = false 
)

Constructor.

virtual DtReflectedAggregateList::~DtReflectedAggregateList ( )
virtual

Destructor.

DtReflectedAggregateList::DtReflectedAggregateList ( const DtReflectedAggregateList orig)
private

Copy constructor – not implemented.

Member Function Documentation

virtual void DtReflectedAggregateList::addAggregateAdditionCallback ( DtAggregateCallbackFunction  cb,
void *  userData 
)
virtual

Aggregate added callback registration/deregistration.

virtual void DtReflectedAggregateList::addAggregateRemovalCallback ( DtAggregateCallbackFunction  cb,
void *  userData 
)
virtual

Aggregate removed callback registration/deregistration.

virtual void DtReflectedAggregateList::aggregateAdded ( DtReflectedAggregate agg)
protectedvirtual

Called after an aggregate is added and before additional callbacks are processed.

Right now, this function only calls DtInfo.

static void DtReflectedAggregateList::aggregateStateCb ( DtAggregateStatePdu pdu,
void *  usr 
)
staticprotected

Callback for the exercise connection.

virtual DtReflectedAggregate* DtReflectedAggregateList::first ( ) const
virtual

Get the first and last elements of the aggregate list.

virtual const DtBaseHashKey& DtReflectedAggregateList::hashKeyFromStateMessage ( const DtStateMsg msg)
protectedvirtual

Get a hash key from a state message.

Implements DtReflectedObjectList.

virtual DtReflectedAggregate* DtReflectedAggregateList::last ( ) const
virtual
virtual DtReflectedAggregate* DtReflectedAggregateList::lookup ( const DtObjectId id) const
virtual

Lookup an aggregate from its object ID.

virtual DtReflectedAggregate* DtReflectedAggregateList::newReflectedAggregate ( const DtEntityIdentifier id,
const DtEntityType type 
) const
protectedvirtual

Create a new reflected aggregate.

virtual DtReflectedObject* DtReflectedAggregateList::newReflectedObj ( const DtStateMsg msg)
protectedvirtual

Create a new object from a state message.

Implements DtReflectedObjectList.

virtual void DtReflectedAggregateList::objectAdded ( DtReflectedObject obj)
protectedvirtual

Called after an aggregate is added and before additional callbacks are processed.

Right now, this function only calls DtInfo.

Reimplemented from DtReflectedObjectList.

DtReflectedAggregateList& DtReflectedAggregateList::operator= ( const DtReflectedAggregateList orig)
private

Assignment operator – not implemented.

virtual void DtReflectedAggregateList::print ( )
virtual

Print the SRs of all objects.

virtual DtReflectedAggregate* DtReflectedAggregateList::processAggregateState ( const DtAggregateStatePdu pdu)
virtual

Process an incoming aggregate state pdu.

Then calls down to base class processStateMessage().

virtual void DtReflectedAggregateList::processRelativeLocationPdu ( const DtRelativeLocationPdu pdu)
virtual

Process an incoming relativeLocation pdu.

virtual DtReflectedObject* DtReflectedAggregateList::processStateMessage ( const DtStateMsg msg)
protectedvirtual

Process an incoming state message.

Reimplemented from DtReflectedObjectList.

static void DtReflectedAggregateList::relativeLocationCb ( DtRelativeLocationPdu pdu,
void *  usr 
)
staticprotected

Callback which calls processRelativeLocationPdu.

virtual void DtReflectedAggregateList::removeAggregateAdditionCallback ( DtAggregateCallbackFunction  cb,
void *  userData 
)
virtual
virtual void DtReflectedAggregateList::removeAggregateRemovalCallback ( DtAggregateCallbackFunction  cb,
void *  userData 
)
virtual

Member Data Documentation

DtEntityIdentifierHashKey* DtReflectedAggregateList::myHashKey
protected
bool DtReflectedAggregateList::mySmoothCapable
protected

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

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)