![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /******************************************************************************* 00002 ** Copyright (c) 2003 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 /******************************************************************************* 00006 ** $RCSfile: reflExtEnt.h,v $ $Revision: 1.14 $ $State: Exp $ 00007 *******************************************************************************/ 00008 00009 #ifndef REFLEXTENT_H 00010 #define REFLEXTENT_H 00011 00012 #if DtHLA 00013 #include <vl/hReflectedObj.h> 00014 #define DtEntReflectedObjectType DtReflectedObject 00015 #elif DtDIS 00016 #include <vl/dReflectedEnt.h> 00017 #define DtEntReflectedObjectType DtReflectedEntity 00018 #elif DtTENA 00019 #include <vl/tReflectedEnt.h> 00020 #define DtEntReflectedObjectType DtReflectedEntity 00021 #else 00022 # pragma message ( "No protocol defined." ) 00023 #endif 00024 00025 #include <vrfExtObjects/extEntSR.h> 00026 00027 // Callback function that takes a DtReflectedExtEntity 00028 // and usr data. 00029 00030 class DtReflectedExtEntity; 00031 00032 typedef void (*DtExtEntityCallbackFunction) 00033 ( 00034 DtReflectedExtEntity* obj, void* userData 00035 ); 00036 00037 class DtExerciseConn; 00038 00039 #include <vrfExtObjects/vrfExtObjectsDefines.h> 00040 class DT_DLL_vrfExtObjects DtReflectedExtEntity : public DtEntReflectedObjectType 00041 { 00042 public: 00043 00044 #if DtHLA 00045 DtReflectedExtEntity 00046 ( 00047 DtHlaObject* obj, 00048 DtExerciseConn* conn 00049 ); 00050 DtReflectedExtEntity(DtExerciseConn* conn, DtEntityStateRepository* esrToUse); 00051 #elif (DtDIS || DtTENA) 00052 // constructor 00053 DtReflectedExtEntity 00054 ( 00055 DtExerciseConn* conn, 00056 const DtEntityIdentifier& id, 00057 const DtEntityType& type 00058 ); 00059 #endif 00060 00061 // destructor 00062 virtual ~DtReflectedExtEntity(); 00063 00064 // Returns ptr to environmentProcessStateRepository -- 00065 // through which you can inspect current state info. 00066 virtual DtExtEntityStateRepository* extEntityStateRep() const; 00067 00068 // Synonym for extEntityStateRep(). 00069 virtual DtExtEntityStateRepository* eesr() const; 00070 00071 // Implementation for abstract base class. Calls cosr(). 00072 virtual DtStateRepository* stateRep() const; 00073 00074 #if DtDIS 00075 // Process an environment process state PDU. 00076 // Calls processEnvironmentProcess(). 00077 virtual void processStateMessage(const DtStateMsg& msg); 00078 #endif 00079 00080 // Get the next and previous elements in the reflected 00081 // cwenvironment process list. 00082 virtual DtReflectedExtEntity* nextEE() const; 00083 virtual DtReflectedExtEntity* prevEE() const; 00084 00085 // Get the next and previous elements, wrap at the ends of the list. 00086 virtual DtReflectedExtEntity* wrapNextEE() const; 00087 virtual DtReflectedExtEntity* wrapPrevEE() const; 00088 00089 // Environment Process callback registration/deregistration. 00090 virtual void addPostUpdateCallback 00091 ( 00092 DtExtEntityCallbackFunction cb, void* userData 00093 ); 00094 virtual void removePostUpdateCallback 00095 ( 00096 DtExtEntityCallbackFunction cb, void* userData 00097 ); 00098 00099 static void postUpdateCallback 00100 ( 00101 DtReflectedExtEntity* ent, void* userData 00102 ); 00103 00104 virtual void processPostUpdateCallback(DtReflectedExtEntity* ent); 00105 00106 virtual void updateExtensions(); 00107 00108 // Overridden from bast class to make public. 00109 virtual void processPostUpdateCallbacks(); 00110 00111 private: 00112 00113 // copy constructor 00114 DtReflectedExtEntity(const DtReflectedExtEntity& orig); 00115 00116 // assignment operator 00117 DtReflectedExtEntity& operator=(const DtReflectedExtEntity& orig); 00118 }; 00119 00120 #endif