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
DtReflectedLinearObjectList Class Reference

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

+ Inheritance diagram for DtReflectedLinearObjectList:
+ Collaboration diagram for DtReflectedLinearObjectList:

Public Member Functions

 DtReflectedLinearObjectList (DtExerciseConn *exConn)
 CTOR.
virtual ~DtReflectedLinearObjectList ()
 Virtual DTOR.
virtual DtReflectedLinearObjectlookup (const DtEntityIdentifier &id) const
 Lookup a Linear Object from the Event ID.
virtual DtReflectedLinearObjectfirst () const
 Get the first and last elements of the reflected Linear Object's list.
virtual DtReflectedLinearObjectlast () const
virtual void addLinearObjectAdditionCallback (DtLinearObjectCallbackFunction cb, void *usr)
 "Linear Object Added" callback registration/deregistration.
virtual void removeLinearObjectAdditionCallback (DtLinearObjectCallbackFunction cb, void *usr)
virtual void addLinearObjectRemovalCallback (DtLinearObjectCallbackFunction cb, void *usr)
 "Linear Object Removed" callback registration/deregistration.
virtual void removeLinearObjectRemovalCallback (DtLinearObjectCallbackFunction cb, void *usr)
virtual void print () const
 Print the SRs of all reflected Linear Object.
virtual void printDataToStream (std::ostream &stream) const
 Print the SRs to a stream.
- Public Member Functions inherited from DtReflectedObjectList
 DtReflectedObjectList (DtExerciseConn *exConn)
 Constructor.
virtual ~DtReflectedObjectList ()
 destructor Warning: makes non-virtual call to removeAndDelete
virtual void initializeAttributePduKindsOfInterest (const std::set< DtPduKind > &pduKinds)
 This initializes which PDU kinds will be processed when receiving an Attribute PDU.
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 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.
virtual void removeObject (DtReflectedObject *obj)
 This is the same as removeAndDelete, it exists to maintain equality with HLA objects.

Protected Member Functions

virtual DtReflectedObjectnewReflectedObj (const DtStateMsg &msg)
 Overrides the base class implementation. Always returns NULL.
virtual DtReflectedLinearObjectnewReflectedLinearObject (const DtEntityIdentifier &id)
 Creates a new reflected Linear Object.
virtual int acceptPdu (const DtStateMsg &msg) const
 Overrides the base class implementation.
virtual DtReflectedObjectprocessStateMessage (const DtStateMsg &msg)
 Overrides the base class implementation. Processes a Linear Object Pdu.
virtual void removeAndDelete (DtReflectedObject *obj, char *msg=0)
 Print message 'msg' and execute the registered "ObjectRemoval" callbacks.
virtual void objectAdded (DtReflectedObject *obj)
 Called after a reflected linear object is added to the list and before addition callbacks are processed.
const DtBaseHashKeyhashKeyFromStateMessage (const DtStateMsg *)
 Overrides the base class implementation.
 DtReflectedLinearObjectList (const DtReflectedLinearObjectList &)
 Copy constructor – Not Implemented.
DtReflectedLinearObjectListoperator= (const DtReflectedLinearObjectList &)
 Assignment operator – Not Implemented.
- Protected Member Functions inherited from DtReflectedObjectList
virtual void doTimeouts ()
 Remove any remote objects which have not been updated during the timeout period.
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 DtBaseHashKeyhashKeyFromAttributeRecordSet (const DtAttributeRecordSet &recordSet)
 Get a hash key from an attribute record set.
virtual bool readyToAdd (DtReflectedObject *obj)
 Returns true if the obj is ready to be added to myObjectList; calls myDiscoveryCondition from within.
virtual void processAttributePduCb (DtAttributeInteraction *inter)

Static Protected Member Functions

static void linearObjectCb (DtLinearObjectStatePdu *pdu, void *usr)
 Callback for the exercise connection.
- Static Protected Member Functions inherited from DtReflectedObjectList
static void doTimeoutsPostDrainCb (void *usr)
 Calls doTimeouts.
static void processAttributePduCb (DtAttributeInteraction *inter, void *usr)

Protected Attributes

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
std::set< DtPduKindmyPduKindSet

Detailed Description

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

Constructor & Destructor Documentation

DtReflectedLinearObjectList::DtReflectedLinearObjectList ( DtExerciseConn exConn)

CTOR.

virtual DtReflectedLinearObjectList::~DtReflectedLinearObjectList ( )
virtual

Virtual DTOR.

DtReflectedLinearObjectList::DtReflectedLinearObjectList ( const DtReflectedLinearObjectList )
protected

Copy constructor – Not Implemented.

Member Function Documentation

virtual int DtReflectedLinearObjectList::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 DtReflectedLinearObjectList::addLinearObjectAdditionCallback ( DtLinearObjectCallbackFunction  cb,
void *  usr 
)
virtual

"Linear Object Added" callback registration/deregistration.

virtual void DtReflectedLinearObjectList::addLinearObjectRemovalCallback ( DtLinearObjectCallbackFunction  cb,
void *  usr 
)
virtual

"Linear Object Removed" callback registration/deregistration.

virtual DtReflectedLinearObject* DtReflectedLinearObjectList::first ( ) const
virtual

Get the first and last elements of the reflected Linear Object's list.

const DtBaseHashKey& DtReflectedLinearObjectList::hashKeyFromStateMessage ( const DtStateMsg )
protectedvirtual

Overrides the base class implementation.

Generates a corresponding key from a Linear Object Pdu. Returns an instance of 'DtEventIdHashKey'. 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 DtReflectedLinearObject* DtReflectedLinearObjectList::last ( ) const
virtual
static void DtReflectedLinearObjectList::linearObjectCb ( DtLinearObjectStatePdu pdu,
void *  usr 
)
staticprotected

Callback for the exercise connection.

virtual DtReflectedLinearObject* DtReflectedLinearObjectList::lookup ( const DtEntityIdentifier id) const
virtual

Lookup a Linear Object from the Event ID.

virtual DtReflectedLinearObject* DtReflectedLinearObjectList::newReflectedLinearObject ( const DtEntityIdentifier id)
protectedvirtual

Creates a new reflected Linear Object.

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

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

Overrides the base class implementation. Always returns NULL.

Implements DtReflectedObjectList.

virtual void DtReflectedLinearObjectList::objectAdded ( DtReflectedObject obj)
protectedvirtual

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

Right now, it only calls DtInfo.

Reimplemented from DtReflectedObjectList.

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

Assignment operator – Not Implemented.

virtual void DtReflectedLinearObjectList::print ( ) const
virtual

Print the SRs of all reflected Linear Object.

Reimplemented from DtReflectedObjectList.

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

Print the SRs to a stream.

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

Overrides the base class implementation. Processes a Linear Object Pdu.

Reimplemented from DtReflectedObjectList.

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

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

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

Reimplemented from DtReflectedObjectList.

virtual void DtReflectedLinearObjectList::removeLinearObjectAdditionCallback ( DtLinearObjectCallbackFunction  cb,
void *  usr 
)
virtual
virtual void DtReflectedLinearObjectList::removeLinearObjectRemovalCallback ( DtLinearObjectCallbackFunction  cb,
void *  usr 
)
virtual

Member Data Documentation

DtEntityIdentifierHashKey* DtReflectedLinearObjectList::myHashKey
protected

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

Document ID: Generated on Mon Feb 6 18:36:34 EST 2017 from SVN revision 173107
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)