VR-Link API Documentation for HLA 1.3
 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 
22 
27 
29 {
30 public:
31 
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);
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 
141 
144 
145 protected:
146 
152 
156 };
157 
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*
174 {
175  return myStateRepForUpdating;
176 }
177 
178 inline DtStateRepository*
180 {
181  return myAsSeenByRemote;
182 }
183 
184 #endif
185 #endif
186 

Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)