VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
baseEntityEncoder.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 
6 
7 #ifndef DtBaseEntityEncoder_H_
8 #define DtBaseEntityEncoder_H_
9 
10 #if DtHLA
11 
12 #include "hlaStateEncoder.h"
13 
17 
21 
24 #define DtDECLARE_ENTITY_ATTR_CHECKER(attrName) \
25  DtDECLARE_ATTR_CHECKER(DtEntityStateRepository, attrName)
26 
29 #define DtDECLARE_ENTITY_ATTR_ENCODER(attrName) \
30  DtDECLARE_ATTR_ENCODER(DtEntityStateRepository, attrName)
31 
34 #define DtDECLARE_AGGREGATE_ATTR_CHECKER(attrName) \
35  DtDECLARE_ATTR_CHECKER(DtAggregateStateRepository, attrName)
36 
39 #define DtDECLARE_AGGREGATE_ATTR_ENCODER(attrName) \
40  DtDECLARE_ATTR_ENCODER(DtAggregateStateRepository, attrName)
41 
44 #define DtDECLARE_BASE_ENTITY_ATTR_CHECKER(attrName) \
45  DtDECLARE_ATTR_CHECKER(DtBaseEntityStateRepository, attrName)
46 
49 #define DtDECLARE_BASE_ENTITY_ATTR_ENCODER(attrName) \
50  DtDECLARE_ATTR_ENCODER(DtBaseEntityStateRepository, attrName)
51 
57 
58 class DT_DLL_VL DtBaseEntityEncoder : public DtHlaStateEncoder
59 {
60 public:
61 
63  DtBaseEntityEncoder(
64  DtExerciseConn* exConn,
65  DtObjClassDesc* classDesc);
66 
68  virtual ~DtBaseEntityEncoder();
69 
71  DtBaseEntityEncoder(const DtBaseEntityEncoder& orig);
72 
74  DtBaseEntityEncoder& operator=(const DtBaseEntityEncoder& orig);
75 
76 public:
77 
79  static DtHlaStateEncoder* create(
80  DtExerciseConn* exConn,
81  DtObjClassDesc* classDesc);
82 
85  static bool tpsiChanged(
86  const DtBaseEntityStateRepository& stateRep,
87  const DtBaseEntityStateRepository& asSeenByRemote);
88 
89 protected:
90 
92 
94  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(Spatial);
95  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(RelativeSpatial);
96  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(IsPartOf);
97 
99  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(AccelerationVector);
100  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(AngularVelocityVector);
101  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(EntityType);
102  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(IsFrozen);
103  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(Orientation);
104  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(VelocityVector);
105 
107  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(DeadReckoningAlgorithm);
108  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(Position);
109  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(EntityIdentifier);
110 
112  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(DRAlgorithm);
113  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(WorldLocation);
114  DtDECLARE_BASE_ENTITY_ATTR_CHECKER(EntityID);
115 
117 
119  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(Spatial);
120  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(RelativeSpatial);
121  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(IsPartOf);
122  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(IsPartOf_RPR_20014); //2.0d14
123 
125  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(AccelerationVector);
126  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(AngularVelocityVector);
127  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(EntityType);
128  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(IsFrozen);
129  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(Orientation);
130  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(VelocityVector);
131 
133  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(DeadReckoningAlgorithm);
134  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(Position);
135  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(EntityIdentifier);
136 
138  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(DRAlgorithm);
139  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(WorldLocation);
140  DtDECLARE_BASE_ENTITY_ATTR_ENCODER(EntityID);
141 };
142 
148 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_ENCODER( \
149  attrName, netType, inspector) \
150  DtDEFINE_SIMPLE_ATTR_ENCODER(DtBaseEntityEncoder, \
151  DtBaseEntityStateRepository, \
152  attrName, netType, inspector)
153 
159 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_CHECKER( \
160  attrName, inspector) \
161  DtDEFINE_SIMPLE_ATTR_CHECKER(DtBaseEntityEncoder, \
162  DtBaseEntityStateRepository, \
163  attrName, inspector)
164 
165 #endif
166 #endif
167 
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
Instances of DtBaseEntityStateRepository are used to maintain basic state information needed by all k...
Definition: baseEntityStateRepository.h:36
This file contains the declaration of DtHlaStateEncoder.
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:41
A protocol independent representation of an aggregate.
Definition: aggregateStateRepository.h:29

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)