VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hlaObjectWithStateRep.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef DtHlaObjectWithStateRep_H_
8 #define DtHlaObjectWithStateRep_H_
9 
10 #if DtHLA
11 
12 
13 #include "hlaObject.h"
14 
18 
19 class DT_DLL_VL DtHlaStateEncoder;
20 class DT_DLL_VL DtHlaStateDecoder;
22 
27 
28 class DT_DLL_VL DtHlaObjectWithStateRep : public DtHlaObject
29 {
30 public:
31 
33  DtHlaObjectWithStateRep(DtExerciseConn* conn,
34 #if DtHLA_1516
35  RTI::ObjectInstanceHandle id,
36 #else
37  RTI::ObjectHandle id,
38 #endif
39  const char* name,
40  DtObjClassDesc &classDesc,
41  bool reflecting);
43  DtHlaObjectWithStateRep(DtExerciseConn* conn,
44  const char* name,
45  DtObjClassDesc &classDesc,
46  bool reflecting);
47 
49  virtual ~DtHlaObjectWithStateRep();
50 
54 
58  virtual void useTheseForUpdating(DtStateRepository* stateRep,
59  DtStateRepository* asSeenByRemote,
60  DtHlaStateEncoder* encoder,
61  DtHlaStateDecoder* decoder);
62 
69  virtual void generateUpdate(
70  const RTI::AttributeHandleSet& eligibleAttrs,
71  const RTI::AttributeHandleSet& requiredAttrs,
72  DtStateMsg* stateMsg);
73 
77  virtual void computeEligible();
78 
80  virtual DtStateRepository* stateRepForUpdating() const;
81 
86  virtual DtStateRepository* stateRepForReflecting() const;
87 
88 
90  virtual DtStateRepository* asSeenByRemote() const;
91 
95 
98  virtual void useTheseForReflecting(DtStateRepository* stateRep,
99  DtHlaStateDecoder* decoder);
100 
102  virtual void stopUsingTheseForReflecting(
103  DtStateRepository* stateRep,
104  DtHlaStateDecoder* decoder);
105 
112  virtual void reflect(const DtStateMsg& stateMsg);
113 
117  virtual void reflectLocal(const DtStateMsg& stateMsg);
118 
122  virtual void printMsg(const DtStateMsg& msg, bool fullReport) const;
123 
124 public:
125 
127  static inline DtHlaObject* create(DtExerciseConn* conn,
128 #if DtHLA_1516
129  RTI::ObjectInstanceHandle id,
130 #else
131  RTI::ObjectHandle id,
132 #endif
133  const char* name,
134  DtObjClassDesc &classDesc,
135  bool reflecting);
136 
137 protected:
138 
140  DtHlaObjectWithStateRep(const DtHlaObjectWithStateRep& orig);
141 
143  DtHlaObjectWithStateRep& operator=(const DtHlaObjectWithStateRep& orig);
144 
145 protected:
146 
148  DtHlaStateDecoder* myDecoder;
149  DtHlaStateEncoder* myEncoder;
150  DtStateRepository* myStateRepForUpdating;
151  DtStateRepository* myAsSeenByRemote;
152 
155  DtList myDecList;
156 };
157 
158 inline DtHlaObject* DtHlaObjectWithStateRep::create(
159  DtExerciseConn* conn,
160 #if DtHLA_1516
161  RTI::ObjectInstanceHandle id,
162 #else
163  RTI::ObjectHandle id,
164 #endif
165  const char* a_name,
166  DtObjClassDesc &classDesc,
167  bool reflecting)
168 {
169  return new DtHlaObjectWithStateRep(conn, id, a_name, classDesc, reflecting);
170 }
171 
172 inline DtStateRepository*
173  DtHlaObjectWithStateRep::stateRepForUpdating() const
174 {
175  return myStateRepForUpdating;
176 }
177 
178 inline DtStateRepository*
179  DtHlaObjectWithStateRep::asSeenByRemote() const
180 {
181  return myAsSeenByRemote;
182 }
183 
184 #endif
185 #endif
186 
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnDIS.h:61
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtList is deprecated, please use std::list<T>.
Definition: vlList.h:71
DtStateRepository is an abstract base class for maintaining state for an object.
Definition: stateRepository.h:50
Instances of DtStateMsg are used to represent state data communicated via the network in a DIS (as op...
Definition: stateMsgDIS.h:21

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)