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 
virtual void computeEligible()
Recomputes the set of attrs that are eligible for sending.
virtual DtStateRepository * stateRepForUpdating() const
Returns current state repository used for updating.
Definition: hlaObjectWithStateRep.h:173
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:60
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
DtHlaStateDecoder * myDecoder
These are all used for encoding only.
Definition: hlaObjectWithStateRep.h:148
DtHlaObject & operator=(const DtHlaObject &src)
Assignment operator: not implemented; do not call.
This file provides a declaration of the class DtHlaObject.
static DtHlaObject * create(DtExerciseConn *conn, RTI::ObjectHandle id, const char *name, DtObjClassDesc &classDesc, bool reflecting)
Creator function for this class.
Definition: hlaObjectWithStateRep.h:158
DtHlaObjectWithStateRep(DtExerciseConn *conn, RTI::ObjectHandle id, const char *name, DtObjClassDesc &classDesc, bool reflecting)
constructor
DtHlaStateEncoder is used to provide encoding of a state repository into a state message in an HLA (a...
Definition: hlaStateEncoder.h:30
virtual void reflect(const DtStateMsg &msg)=0
Handle reflection of object (receipt of state message) from the network.
virtual DtStateRepository * asSeenByRemote() const
Returns asSeenByRemote.
Definition: hlaObjectWithStateRep.h:179
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class.
Definition: objClassDesc13.h:41
Instances of DtHlaObject are used to represent HLA objects which are communicated across the network...
Definition: hlaObject.h:56
DtList is deprecated, please use std::list<T>.
Definition: vlList.h:71
DtList myDecList
List of decoder/stateRep pairs.
Definition: hlaObjectWithStateRep.h:155
DtHlaStateDecoder is used to provide decoding of a state message into a state repository in an HLA (a...
Definition: hlaStateDecoder.h:32
DtStateRepository * myStateRepForUpdating
Definition: hlaObjectWithStateRep.h:150
DtStateRepository * myAsSeenByRemote
Definition: hlaObjectWithStateRep.h:151
DtStateRepository is an abstract base class for maintaining state for an object.
Definition: stateRepository.h:50
DtHlaStateEncoder * myEncoder
Definition: hlaObjectWithStateRep.h:149
virtual void generateUpdate(const RTI::AttributeHandleSet &eligibileAttrs, const RTI::AttributeHandleSet &requiredAttrs, DtStateMsg *msg)
Called by update to actually generate an outgoing message.
virtual void reflectLocal(const DtStateMsg &msg)=0
Called by callReflectLocal to handle the reflection of updates that we are sending locally...
class DtStateMsg:
Definition: stateMsgHLA.h:32
virtual void printMsg(const DtStateMsg &msg, bool fullReport=false) const
Prints contents of a state msg.
class DtHlaObjectWithStateRep:
Definition: hlaObjectWithStateRep.h:28

Document ID: Generated on Mon Apr 25 03:39:01 EDT 2022 from SVN revision 242502
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)