This file contains the declaration of DtInteractionDecoder.
More...
Go to the source code of this file.
Classes |
| class | DtInteractionDecoder |
| | Instances of DtInteractionDecoder are used to decode interactions from the network. More...
|
Defines |
| #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.
Define Documentation
This can be used to add a parameter decoder function from a routine.
Value:static void decode##paramName(RepT* inter, \
const RTI::ParameterHandleValuePairSet& params, int pairSetIndex)
This can be used to declare attributeDecoder functions which are static members of a class.
Value:void decClass::decode##paramName(interClass* inter, \
const RTI::ParameterHandleValuePairSet& params, \
int index) \
{ \
RTI::ULong length = 0; \
DtGlobalObjectDesignator objName = \
(char*) params.getValuePointer(index, length); \
inter->mutator(objName); \
}
Value:void decClass::decode##paramName(interClass* inter, \
const RTI::ParameterHandleValuePairSet& params, \
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); \
}