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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)