VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
reflectedExtEntity.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
8 #include <vl/reflectedEntity.h>
9 
10 #define DtEntReflectedObjectType DtReflectedEntity
11 
13 
14 // Callback function that takes a DtReflectedExtEntity
15 // and usr data.
16 
18 
19 typedef void (*DtExtEntityCallbackFunction)
20 (
21  DtReflectedExtEntity* obj, void* userData
22 );
23 
24 class DtExerciseConn;
25 
27 
28 /*
29  This class extends DtReflectedEntity from VR-Link.
30 
31  In VR-Forces, on the Gui side, instances are created instead of instances of DtReflectedEntity.
32 
33  Additional note: this class is also responsible for setting up extended DI-Guy decoders, which
34  allow the contents of DI-Guy related packets to be controlled from VrfVrlExt, so that modifications
35  don't need to be made to code in VR-Link.
36 */
38 {
39 public:
40 
41 #if DtHLA
43  (
44  DtHlaObject* obj,
45  DtExerciseConn* conn
46  );
47  DtReflectedExtEntity(DtExerciseConn* conn, DtEntityStateRepository* esrToUse);
48 #elif (DtDIS || DtTENA)
49  // constructor
51  (
52  DtExerciseConn* conn,
53  const DtEntityIdentifier& id,
54  const DtEntityType& type
55  );
56 #endif
57 
58  // destructor
59  virtual ~DtReflectedExtEntity();
60 
61  // Returns ptr to environmentProcessStateRepository --
62  // through which you can inspect current state info.
63  virtual DtExtEntityStateRepository* extEntityStateRep() const;
64 
65  // Synonym for extEntityStateRep().
66  virtual DtExtEntityStateRepository* eesr() const;
67 
68  // Implementation for abstract base class. Calls cosr().
69  virtual DtStateRepository* stateRep() const;
70 
71 #if DtDIS
72  // Process an environment process state PDU.
73  // Calls processEnvironmentProcess().
74  virtual void processStateMessage(const DtStateMsg& msg);
75 #endif
76 
77  // Get the next and previous elements in the reflected
78  // cwenvironment process list.
79  virtual DtReflectedExtEntity* nextEE() const;
80  virtual DtReflectedExtEntity* prevEE() const;
81 
82  // Get the next and previous elements, wrap at the ends of the list.
83  virtual DtReflectedExtEntity* wrapNextEE() const;
84  virtual DtReflectedExtEntity* wrapPrevEE() const;
85 
86  // Environment Process callback registration/deregistration.
87  virtual void addPostUpdateCallback
88  (
89  DtExtEntityCallbackFunction cb, void* userData
90  );
91  virtual void removePostUpdateCallback
92  (
93  DtExtEntityCallbackFunction cb, void* userData
94  );
95 
96  static void postUpdateCallback
97  (
98  DtReflectedExtEntity* ent, void* userData
99  );
100 
101  virtual void processPostUpdate();
102 
105 #if DtHLA
106  virtual void diGuyObjectUpdated();
107 #endif
108 
109  virtual void updateExtensions();
110 
111  // Overridden from bast class to make public.
112  virtual void processPostUpdateCallbacks();
113 
114 protected:
115 
116 private:
117 
118  // copy constructor
120 
121  // assignment operator
122  DtReflectedExtEntity& operator=(const DtReflectedExtEntity& orig);
123 };

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)