VR-Link API Documentation for HLA Evolved
Classes | Defines
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...

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

#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; \
   DtGlobalObjectDesignator objName = \
      (char*) params.getValuePointer(index, length); \
   inter->mutator(objName); \
}
#define DtDEFINE_SIMPLE_PARAM_DECODER (   decClass,
  interClass,
  paramName,
  netType,
  mutator 
)
Value:
DtDEFINE_SIMPLE_PARAM_DECODER_WITH_CAST(decClass, interClass, \
      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 Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)