![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2004 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: refExtEmitList.h,v $ $Revision: 1.10 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef REFEXTEMITLIST_H 00010 #define REFEXTEMITLIST_H 00011 00012 #include <vl/refEmitLst.h> 00013 00014 class DtReflectedEntityList; 00015 class DtReflectedEntity; 00016 00017 #include <map> 00018 // class DtReflectedExtEmitterSystemList: 00019 // 00020 // Instances of DtReflectedExtEntityList manage the list of 00021 // remote emitters in the exercise. In DIS only it will remove 00022 // an emitter once the associated entity that it was attached to 00023 // is deleted. In HLA this class will simply use the base class 00024 00025 #include <vrfExtObjects/vrfExtObjectsDefines.h> 00026 class DT_DLL_vrfExtObjects DtReflectedExtEmitterSystemList : public DtReflectedEmitterSystemList 00027 { 00028 public: 00029 00030 // Constructor - obtains the set of object classes to subscribe 00031 // to from the exConn's fomMapper. 00032 DtReflectedExtEmitterSystemList(DtExerciseConn* exConn); 00033 00034 #if DtHLA 00035 DtReflectedExtEmitterSystemList(DtExerciseConn* exConn, const DtDDMRegionSet* regionSetToUse); 00036 00039 DtReflectedExtEmitterSystemList(DtExerciseConn* exConn, 00040 const DtList *handleList, const DtDDMRegionSet* regionSetToUse = 0); 00041 #endif 00042 00043 // destructor 00044 virtual ~DtReflectedExtEmitterSystemList(); 00045 00046 // This routine will set the reflected entity list and also 00047 // attach a callback to be triggerd any time an entity is deleted 00048 virtual void setReflectedEntityList(DtReflectedEntityList* l); 00049 00050 // This function receives entityRemovalCallback from the reflected 00051 // entity list, then calls entityRemoval. It also removes the 00052 // entityPostUpdateCallback from the reflected entity. 00053 static void entityRemovalCallback(DtReflectedEntity* e, void* usr); 00054 00055 #if !DtTENA 00056 // If there is an emitter in the list that is attached to this entity, 00057 // remove it 00058 virtual void processEntityRemoval(DtReflectedEntity* e); 00059 #endif 00060 00061 #ifdef DtHLA 00062 virtual void processEmitterBeamRemoval(DtReflectedEmitterBeam* beam); 00063 virtual void processEmitterBeamAddition(DtReflectedEmitterBeam* beam); 00064 00065 virtual bool removeObject(const DtObjectId& id); 00066 #endif 00067 00068 private: 00069 // not implemented 00070 DtReflectedExtEmitterSystemList ( const DtReflectedExtEmitterSystemList& orig); 00071 DtReflectedExtEmitterSystemList& operator= ( const DtReflectedExtEmitterSystemList& rhs); 00072 00073 protected: 00074 typedef struct _DtBeamIdStruct 00075 { 00076 DtGlobalObjectDesignator emittingSystemId; 00077 DtGlobalObjectDesignator globalId; 00078 } 00079 DtBeamIdStruct; 00080 00081 typedef std::map<int, DtBeamIdStruct> DtBeamIdMap; 00082 protected: 00083 DtReflectedEntityList* myReflectedEntityList; 00084 DtBeamIdMap myBeamMap; 00085 }; 00086 00087 #endif // REFEXTEMITLIST_H 00088