11 #ifndef DtIffDecoder_H_
12 #define DtIffDecoder_H_
31 #define DtDECLARE_IFF_ATTR_DECODER(attrName) \
32 DtDECLARE_ATTR_DECODER(DtIffStateRepository, attrName)
41 #define DtDEFINE_SIMPLE_IFF_ATTR_DECODER( \
42 attrName, netType, inspector) \
43 DtDEFINE_SIMPLE_IFF_ATTR_DECODER_WITH_CAST( \
44 attrName, netType, inspector, (netType))
51 #define DtDEFINE_SIMPLE_IFF_ATTR_DECODER_WITH_CAST( \
52 attrName, netType, mutator, castExpr) \
53 DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST( \
54 DtIffDecoder, DtIffStateRepository, \
55 attrName, netType, mutator, castExpr)
57 #define DtDEFINE_SIMPLE_IFF_ATTR_DECODER_WITH_CAST_AND_PARAM( \
58 decClass, attrName, netType, mutator, param, castExpr) \
59 void decClass::decode##attrName( \
60 DtIffStateRepository* stateRep, \
61 const RTI::AttributeHandleValuePairSet& attrs, \
64 RTI::ULong length = attrs.getValueLength(pairSetIndex); \
66 if (length > sizeof(netType)) \
68 DtWarn("Size of value decoded from RTI update for attribute %s (%d)\n", \
70 DtWarn(" is larger than size of %s (%d)\n", #netType, sizeof(netType)); \
73 attrs.getValue(pairSetIndex, (char*) &netVal, length); \
74 stateRep->mutator(param, castExpr netVal); \