VR-Forces 4.1.1 Class Documentation
reflExtEnt.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 /*******************************************************************************
6 ** $RCSfile: reflExtEnt.h,v $ $Revision: 1.14 $ $State: Exp $
7 *******************************************************************************/
8 
9 #ifndef REFLEXTENT_H
10 #define REFLEXTENT_H
11 
12 #if DtHLA
13  #include <vl/hReflectedObj.h>
14  #define DtEntReflectedObjectType DtReflectedObject
15 #elif DtDIS
16  #include <vl/dReflectedEnt.h>
17  #define DtEntReflectedObjectType DtReflectedEntity
18 #elif DtTENA
19  #include <vl/tReflectedEnt.h>
20  #define DtEntReflectedObjectType DtReflectedEntity
21 #else
22 # pragma message ( "No protocol defined." )
23 #endif
24 
25 #include <vrfExtObjects/extEntSR.h>
26 
27 // Callback function that takes a DtReflectedExtEntity
28 // and usr data.
29 
31 
32 typedef void (*DtExtEntityCallbackFunction)
33 (
34  DtReflectedExtEntity* obj, void* userData
35 );
36 
37 class DtExerciseConn;
38 
41 {
42 public:
43 
44 #if DtHLA
46  (
47  DtHlaObject* obj,
48  DtExerciseConn* conn
49  );
50  DtReflectedExtEntity(DtExerciseConn* conn, DtEntityStateRepository* esrToUse);
51 #elif (DtDIS || DtTENA)
52  // constructor
54  (
55  DtExerciseConn* conn,
56  const DtEntityIdentifier& id,
57  const DtEntityType& type
58  );
59 #endif
60 
61  // destructor
62  virtual ~DtReflectedExtEntity();
63 
64  // Returns ptr to environmentProcessStateRepository --
65  // through which you can inspect current state info.
66  virtual DtExtEntityStateRepository* extEntityStateRep() const;
67 
68  // Synonym for extEntityStateRep().
69  virtual DtExtEntityStateRepository* eesr() const;
70 
71  // Implementation for abstract base class. Calls cosr().
72  virtual DtStateRepository* stateRep() const;
73 
74 #if DtDIS
75  // Process an environment process state PDU.
76  // Calls processEnvironmentProcess().
77  virtual void processStateMessage(const DtStateMsg& msg);
78 #endif
79 
80  // Get the next and previous elements in the reflected
81  // cwenvironment process list.
82  virtual DtReflectedExtEntity* nextEE() const;
83  virtual DtReflectedExtEntity* prevEE() const;
84 
85  // Get the next and previous elements, wrap at the ends of the list.
86  virtual DtReflectedExtEntity* wrapNextEE() const;
87  virtual DtReflectedExtEntity* wrapPrevEE() const;
88 
89  // Environment Process callback registration/deregistration.
90  virtual void addPostUpdateCallback
91  (
92  DtExtEntityCallbackFunction cb, void* userData
93  );
94  virtual void removePostUpdateCallback
95  (
96  DtExtEntityCallbackFunction cb, void* userData
97  );
98 
99  static void postUpdateCallback
100  (
101  DtReflectedExtEntity* ent, void* userData
102  );
103 
104  virtual void processPostUpdateCallback(DtReflectedExtEntity* ent);
105 
106  virtual void updateExtensions();
107 
108  // Overridden from bast class to make public.
109  virtual void processPostUpdateCallbacks();
110 
111 private:
112 
113  // copy constructor
115 
116  // assignment operator
117  DtReflectedExtEntity& operator=(const DtReflectedExtEntity& orig);
118 };
119 
120 #endif

Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)