7 #ifndef physicalEntityDecoder_H_
8 #define physicalEntityDecoder_H_
119 static void decodeAttParts(
int numParams,
123 static void convertFromRPR1_0(
134 #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER_WITH_CAST( \
135 attrName, netType, mutator, castExpr) \
136 DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST( \
137 DtPhysicalEntityDecoder, DtEntityStateRepository, \
138 attrName, netType, mutator, castExpr)
140 #define DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER( \
141 attrName, netType, inspector) \
142 DtDEFINE_SIMPLE_PHYS_ENTITY_ATTR_DECODER_WITH_CAST( \
143 attrName, netType, inspector, (netType))
145 #define DtDEFINE_LIGHT_ATTR_DECODER( \
146 decClass, attrName, arg1) \
147 void decClass::decode##attrName( \
148 DtEntityStateRepository* stateRep, \
149 const RTI::AttributeHandleValuePairSet& attrs, \
152 RTI::ULong length = attrs.getValueLength(pairSetIndex); \
153 if (length > sizeof(DtNetBoolean)) \
155 DtWarn("Size of value decoded from RTI update for attribute %s (%d)\n", \
156 #attrName, length); \
157 DtWarn(" is larger than size of %s (%d)\n", "DtNetBoolean", sizeof(DtNetBoolean)); \
159 DtNetBoolean netVal; \
160 attrs.getValue(pairSetIndex, (char *) &netVal, length); \
161 stateRep->setLightState(arg1, (bool) (DtU32) netVal); \