3 #ifndef DtSovietIffEncoder_H_
4 #define DtSovietIffEncoder_H_
21 #define DtDECLARE_SOVIET_IFF_ATTR_CHECKER(attrName) \
22 DtDECLARE_ATTR_CHECKER(DtIffStateRepository, attrName)
26 #define DtDECLARE_SOVIET_IFF_ATTR_ENCODER(attrName) \
27 DtDECLARE_ATTR_ENCODER(DtIffStateRepository, attrName)
33 #define DtDEFINE_SIMPLE_SOVIET_IFF_ATTR_ENCODER( \
34 attrName, netType, inspector) \
35 DtDEFINE_SIMPLE_ATTR_ENCODER(DtSovietIffEncoder, \
36 DtSovietStateRepository, attrName, netType, inspector)
43 #define DtDEFINE_SIMPLE_SOVIET_IFF_ATTR_CHECKER( \
44 attrName, inspector) \
45 DtDEFINE_SIMPLE_ATTR_CHECKER(DtSovietIffEncoder, \
46 DtSovietStateRepository, attrName, inspector)
53 #define DtDEFINE_SIMPLE_SOVIET_ATTR_ENCODER_WITH_PARAM(\
54 encClass, stateRepClass, attrName, netType, inspector, param) \
55 void encClass::encode##attrName(const stateRepClass& rep, \
56 RTI::AttributeHandleValuePairSet* attrs, \
57 RTI::AttributeHandle attrHandle) \
60 netVal = rep.soviet()->inspector(param); \
61 attrs->add(attrHandle, (char*) &netVal, sizeof(netType)); \
64 #define DtDEFINE_SIMPLE_SOVIET_IFF_ATTR_ENCODER_WITH_PARAM( \
65 attrName, netType, inspector, param) \
66 DtDEFINE_SIMPLE_SOVIET_ATTR_ENCODER_WITH_PARAM( \
67 DtSovietIffEncoder, DtIffStateRepository, attrName, netType, inspector, param)
69 #define DtDEFINE_SIMPLE_SOVIET_ATTR_CHECKER_WITH_PARAM( \
70 encClass, stateRepClass, attrName, inspector, param) \
71 bool encClass::need##attrName(const stateRepClass& stateRep, \
72 const stateRepClass& asSeenByRemote) \
74 return (bool) !(stateRep.soviet()->inspector(param) == \
75 asSeenByRemote.soviet()->inspector(param)); \
83 #define DtDEFINE_SIMPLE_SOVIET_IFF_ATTR_CHECKER_WITH_PARAM( \
84 attrName, inspector, param) \
85 DtDEFINE_SIMPLE_SOVIET_ATTR_CHECKER_WITH_PARAM( \
86 DtSovietIffEncoder, DtIffStateRepository, attrName, inspector, param)
179 #define DtDEFINE_SIMPLE_MAKRPR3_SOVIET_IFF_TRANSPONDER_ATTR_ENCODER( \
180 attrName, netType, inspector) \
181 DtDEFINE_SIMPLE_ATTR_ENCODER(DtMAKRPR3_SovietIffTransponderEncoder, \
182 DtIffStateRepository, attrName, netType, inspector)
189 #define DtDEFINE_SIMPLE_MAKRPR3_SOVIET_IFF_TRANSPONDER_ATTR_CHECKER( \
190 attrName, inspector) \
191 DtDEFINE_SIMPLE_ATTR_CHECKER(DtMAKRPR3_SovietIffTransponderEncoder, \
192 DtIffStateRepository, attrName, inspector)
228 #define DtDEFINE_SIMPLE_MAKRPR3_SOVIET_IFF_INTERROGATOR_ATTR_ENCODER( \
229 attrName, netType, inspector) \
230 DtDEFINE_SIMPLE_ATTR_ENCODER(DtMAKRPR3_SovietIffInterrogatorEncoder, \
231 DtIffStateRepository, attrName, netType, inspector)
238 #define DtDEFINE_SIMPLE_MAKRPR3_SOVIET_IFF_INTERROGATOR_ATTR_CHECKER( \
239 attrName, inspector) \
240 DtDEFINE_SIMPLE_ATTR_CHECKER(DtMAKRPR3_SovietIffInterrogatorEncoder, \
241 DtIffStateRepository, attrName, inspector)
Instances of DtSovietStateRepository are used to store state data for IFFData.Soviet objects...
Definition: iffSovietStateRepository.h:29
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
This file provides a declaration of the class DtIffEncoder.
#define DtDECLARE_SOVIET_IFF_ATTR_ENCODER(attrName)
This is used to declare static member functions that perform attribute encoding.
Definition: sovietIffEncoder.h:26
static DtHlaStateEncoder * create(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
DtHlaStateEncoder is used to provide encoding of a state repository into a state message in an HLA (a...
Definition: hlaStateEncoder.h:30
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class.
Definition: objClassDesc1516.h:41
DtSovietIffEncoder & operator=(const DtSovietIffEncoder &orig)
assignment operator
DtDECLARE_IFF_ATTR_CHECKER(EventIdentifier)
DtDECLARE_IFF_ATTR_ENCODER(EventIdentifier)
Definition: sovietIffEncoder.h:88
#define DtDECLARE_SOVIET_IFF_ATTR_CHECKER(attrName)
We define several macros that can be helpful in defining the class, and the individual decoding funct...
Definition: sovietIffEncoder.h:21
The DtIffEncoder class:
Definition: iffEncoder.h:69
static DtHlaStateEncoder * create(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
Definition: sovietIffEncoder.h:194
DtIffEncoder & operator=(const DtIffEncoder &orig)
assignment operator
Definition: sovietIffEncoder.h:243