This file contains the declaration of DtInteractionDecoder.
More...
Go to the source code of this file.
Macros |
| #define | DtADD_PARAM_DECODER(attrName) addDecoder((char *)#attrName, (DtParameterDecoder) decode##attrName) |
| | This can be used to add a parameter decoder function from a routine.
|
| #define | DtDECLARE_PARAM_DECODER(RepT, paramName) |
| | This can be used to declare attributeDecoder functions which are static members of a class.
|
| #define | DtDEFINE_SIMPLE_PARAM_DECODER_WITH_CAST(decClass, interClass, paramName, netType, mutator, castExpr) |
| #define | DtDEFINE_SIMPLE_GLOBAL_OBJECT_DESIGNATOR_PARAM_DECODER(decClass, interClass, paramName, mutator) |
| #define | DtDEFINE_SIMPLE_PARAM_DECODER(decClass, interClass, paramName, netType, mutator) |
Detailed Description
This file contains the declaration of DtInteractionDecoder.
Macro Definition Documentation
This can be used to add a parameter decoder function from a routine.
| #define DtDECLARE_PARAM_DECODER |
( |
|
RepT, |
|
|
|
paramName |
|
) |
| |
Value:static void decode##paramName(RepT* inter, \
This can be used to declare attributeDecoder functions which are static members of a class.
| #define DtDEFINE_SIMPLE_GLOBAL_OBJECT_DESIGNATOR_PARAM_DECODER |
( |
|
decClass, |
|
|
|
interClass, |
|
|
|
paramName, |
|
|
|
mutator |
|
) |
| |
Value:void decClass::decode##paramName(interClass* inter, \
int index) \
(char*) params.getValuePointer(index, length); \
inter->mutator(objName); \
}
| #define DtDEFINE_SIMPLE_PARAM_DECODER |
( |
|
decClass, |
|
|
|
interClass, |
|
|
|
paramName, |
|
|
|
netType, |
|
|
|
mutator |
|
) |
| |
Value:
paramName, netType, mutator, (netType))
| #define DtDEFINE_SIMPLE_PARAM_DECODER_WITH_CAST |
( |
|
decClass, |
|
|
|
interClass, |
|
|
|
paramName, |
|
|
|
netType, |
|
|
|
mutator, |
|
|
|
castExpr |
|
) |
| |
Value:void decClass::decode##paramName(interClass* inter, \
int index) \
RTI::ULong length = params.getValueLength(index); \
if (length > sizeof(netType)) \
{ \
DtWarn("Size of value decoded for parameter %s (%d)\n", \
#paramName, length); \
DtWarn(" is larger than size of %s (%d)\n", #netType, sizeof(netType)); \
return; \
} \
netType netVal; \
params.getValue(index, (char*) &netVal, length); \
inter->mutator(castExpr netVal); \
}