11 #ifndef DtIffEncoder_H_
12 #define DtIffEncoder_H_
30 #define DtDECLARE_IFF_ATTR_CHECKER(attrName) \
31 DtDECLARE_ATTR_CHECKER(DtIffStateRepository, attrName)
35 #define DtDECLARE_IFF_ATTR_ENCODER(attrName) \
36 DtDECLARE_ATTR_ENCODER(DtIffStateRepository, attrName)
42 #define DtDEFINE_SIMPLE_IFF_ATTR_ENCODER( \
43 attrName, netType, inspector) \
44 DtDEFINE_SIMPLE_ATTR_ENCODER(DtIffEncoder, \
45 DtIffStateRepository, attrName, netType, inspector)
52 #define DtDEFINE_SIMPLE_IFF_ATTR_CHECKER( \
53 attrName, inspector) \
54 DtDEFINE_SIMPLE_ATTR_CHECKER(DtIffEncoder, \
55 DtIffStateRepository, attrName, inspector)
62 #define DtDEFINE_SIMPLE_IFF_ATTR_ENCODER_WITH_PARAM( \
63 encClass, attrName, netType, inspector, param) \
64 void encClass::encode##attrName(const DtIffStateRepository& rep, \
65 RTI::AttributeHandleValuePairSet* attrs, \
66 RTI::AttributeHandle attrHandle) \
69 netVal = rep.inspector(param); \
70 attrs->add(attrHandle, (char*) &netVal, sizeof(netType)); \
78 #define DtDEFINE_SIMPLE_IFF_ATTR_CHECKER_WITH_PARAM( \
79 encClass, attrName, inspector, param) \
80 bool encClass::need##attrName(const DtIffStateRepository& stateRep, \
81 const DtIffStateRepository& asSeenByRemote) \
83 return (bool) !(stateRep.inspector(param) == \
84 asSeenByRemote.inspector(param)); \
90 class DT_DLL_VL DtIffEncoder :
public DtBaseEmbeddedSystemEncoder
97 DtObjClassDesc* classDesc);
100 virtual ~DtIffEncoder();
103 DtIffEncoder(
const DtIffEncoder& orig);
106 DtIffEncoder& operator=(
const DtIffEncoder& orig);
110 static DtHlaStateEncoder* create(
112 DtObjClassDesc* classDesc);
116 DtDECLARE_IFF_ATTR_CHECKER(EventIdentifier);
117 DtDECLARE_IFF_ATTR_CHECKER(SystemMode);
118 DtDECLARE_IFF_ATTR_CHECKER(SystemName);
119 DtDECLARE_IFF_ATTR_CHECKER(SystemType);
120 DtDECLARE_IFF_ATTR_CHECKER(SystemIsOn);
121 DtDECLARE_IFF_ATTR_CHECKER(SystemIsOperational);
124 DtDECLARE_IFF_ATTR_CHECKER(BeamAzimuthCenter);
125 DtDECLARE_IFF_ATTR_CHECKER(BeamAzimuthSweep);
126 DtDECLARE_IFF_ATTR_CHECKER(BeamElevationCenter);
127 DtDECLARE_IFF_ATTR_CHECKER(BeamElevationSweep);
128 DtDECLARE_IFF_ATTR_CHECKER(BeamSweepSync);
129 DtDECLARE_IFF_ATTR_CHECKER(Layer2DataAvailable);
130 DtDECLARE_IFF_ATTR_CHECKER(FundamentalParameterData);
131 DtDECLARE_IFF_ATTR_CHECKER(SecondaryOperationalDataParameter1);
132 DtDECLARE_IFF_ATTR_CHECKER(SecondaryOperationalDataParameter2);
135 DtDECLARE_IFF_ATTR_ENCODER(EventIdentifier);
136 DtDECLARE_IFF_ATTR_ENCODER(SystemMode);
137 DtDECLARE_IFF_ATTR_ENCODER(SystemName);
138 DtDECLARE_IFF_ATTR_ENCODER(SystemType);
139 DtDECLARE_IFF_ATTR_ENCODER(SystemIsOn);
140 DtDECLARE_IFF_ATTR_ENCODER(SystemIsOperational);
143 DtDECLARE_IFF_ATTR_ENCODER(BeamAzimuthCenter);
144 DtDECLARE_IFF_ATTR_ENCODER(BeamAzimuthSweep);
145 DtDECLARE_IFF_ATTR_ENCODER(BeamElevationCenter);
146 DtDECLARE_IFF_ATTR_ENCODER(BeamElevationSweep);
147 DtDECLARE_IFF_ATTR_ENCODER(BeamSweepSync);
148 DtDECLARE_IFF_ATTR_ENCODER(Layer2DataAvailable);
149 DtDECLARE_IFF_ATTR_ENCODER(FundamentalParameterData);
150 DtDECLARE_IFF_ATTR_ENCODER(SecondaryOperationalDataParameter1);
151 DtDECLARE_IFF_ATTR_ENCODER(SecondaryOperationalDataParameter2);