VR-Link API Documentation for HLA 1.3
Classes | Macros
interDecoder.h File Reference

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...

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

#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 
)
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.

#define DtDEFINE_SIMPLE_GLOBAL_OBJECT_DESIGNATOR_PARAM_DECODER (   decClass,
  interClass,
  paramName,
  mutator 
)
Value:
void decClass::decode##paramName(interClass* inter, \
const RTI::ParameterHandleValuePairSet& params, \
int index) \
{ \
RTI::ULong length = 0; \
(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, \
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); \
}

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)