VR-Link API Documentation for HLA 1.3
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 
75  virtual DtStateRepository* stateRepForUpdating() const;
76 
81  virtual DtStateRepository* stateRepForReflecting() const;
82 
83 
85  virtual DtStateRepository* asSeenByRemote() const;
86 
90 
93  virtual void useTheseForReflecting(DtStateRepository* stateRep,
94  DtHlaStateDecoder* decoder);
95 
97  virtual void stopUsingTheseForReflecting(
98  DtStateRepository* stateRep,
99  DtHlaStateDecoder* decoder);
100 
107  virtual void reflect(const DtStateMsg& stateMsg);
108 
112  virtual void reflectLocal(const DtStateMsg& stateMsg);
113 
117  virtual void printMsg(const DtStateMsg& msg, bool fullReport) const;
118 
119 public:
120 
122  static inline DtHlaObject* create(DtExerciseConn* conn,
123 #if DtHLA_1516
124  RTI::ObjectInstanceHandle id,
125 #else
126  RTI::ObjectHandle id,
127 #endif
128  const char* name,
129  DtObjClassDesc &classDesc,
130  bool reflecting);
131 
132 protected:
133 
136 
139 
140 protected:
141 
147 
151 };
152 
154  DtExerciseConn* conn,
155 #if DtHLA_1516
156  RTI::ObjectInstanceHandle id,
157 #else
158  RTI::ObjectHandle id,
159 #endif
160  const char* a_name,
161  DtObjClassDesc &classDesc,
162  bool reflecting)
163 {
164  return new DtHlaObjectWithStateRep(conn, id, a_name, classDesc, reflecting);
165 }
166 
167 inline DtStateRepository*
169 {
170  return myStateRepForUpdating;
171 }
172 
173 inline DtStateRepository*
175 {
176  return myAsSeenByRemote;
177 }
178 
179 #endif
180 #endif
181 

Document ID: Generated on Wed Oct 23 22:25:48 EDT 2013 from SVN revision 132765
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)