VR-Link API Documentation for HLA Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros
interactionDecoder.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(paramName)   addDecoder((char *)#paramName, (DtParameterDecoder) decode##paramName)
 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 parameterDecoder functions which are static members of a class.
#define DtDEFINE_SIMPLE_PARAM_DECODER_WITH_CAST(decClass, interClass, paramName, netType, mutator, castExpr)
 Defines a "simple" parameter decoder.
#define DtDEFINE_SIMPLE_PARAM_DECODER_WITH_CAST_SET(decClass, interClass, paramName, netType, castExpr)
 Defines a "simple" parameter decoder.
#define DtDEFINE_SIMPLE_PARAM_DECODER_MUTATOR(decClass, interClass, paramName, netType, mutator)
 Defines a "simple" parameter decoder.
#define DtDEFINE_SIMPLE_PARAM_DECODER_MUTATOR_SET(decClass, interClass, paramName, netType)
 Defines a "simple" parameter decoder.
#define DtDEFINE_SIMPLE_GLOBAL_OBJECT_DESIGNATOR_PARAM_DECODER(decClass, interClass, paramName, mutator)
#define DtDEFINE_SIMPLE_PARAM_DECODER_BUFF(decClass, interClass, paramName, mutator)
 Defines a char* buffer parameter decoder.
#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 (   paramName)    addDecoder((char *)#paramName, (DtParameterDecoder) decode##paramName)

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

Defines a char* buffer parameter decoder.

One in which we merely extract the data from the PHVPS and pass it and the length to the named interaction mutator. Arguments are the decoder class, the interaction class, the parameter name, the network type, and the mutator.

#define DtDEFINE_SIMPLE_PARAM_DECODER_MUTATOR (   decClass,
  interClass,
  paramName,
  netType,
  mutator 
)
Value:
void decClass::decode##paramName(interClass* inter, \
const RTI::ParameterHandleValuePairSet& params, \
int index) \
{ \
RTI::ULong length = 0; \
netType* netValPtr = (netType*)parameterData(params, index, length, sizeof(netType), #paramName); \
if (netValPtr) \
{ \
inter->mutator(*netValPtr); \
} \
}

Defines a "simple" parameter decoder.

One in which we merely extracts the data from the PHVPS into a variable of the named network type. The network variable is passed to the named interaction mutator. The network type must have an implicit cast to the type expected by the mutator. Arguments are the decoder class, the interaction class, the parameter name, the network type, and the mutator.

#define DtDEFINE_SIMPLE_PARAM_DECODER_MUTATOR_SET (   decClass,
  interClass,
  paramName,
  netType 
)
Value:
paramName, netType, set##paramName)

Defines a "simple" parameter decoder.

One in which we merely extracts the data from the PHVPS into a variable of the named network type. The network variable is passed to the named interaction mutator. The network type must have an implicit cast to the type expected by the mutator. Arguments are the decoder class, the interaction class, the parameter name, the network type, and the mutator.

#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 = 0; \
netType* netValPtr = (netType*)parameterData(params, index, length, sizeof(netType), #paramName); \
if (netValPtr) \
{ \
inter->mutator(castExpr *netValPtr); \
} \
}

Defines a "simple" parameter decoder.

One in which we merely extract the data from the PHVPS into a variable of the named network type, and pass it to a named interaction mutator using the given cast expression. This works when the network type used to store the FOM representation can be converted to the native type expected by the mutator. Arguments are the decoder class, the interaction class, the parameter name, the network type, the mutator, and the cast operation.

#define DtDEFINE_SIMPLE_PARAM_DECODER_WITH_CAST_SET (   decClass,
  interClass,
  paramName,
  netType,
  castExpr 
)
Value:
paramName, netType, set##paramName, castExpr)

Defines a "simple" parameter decoder.

One in which we merely extract the data from the PHVPS into a variable of the named network type, and pass it to a interaction mutator named setParamName using the given cast expression. This works when the network type used to store the FOM representation can be converted to the native type expected by the mutator. Arguments are the decoder class, the interaction class, the parameter name, the network type, and the cast operation.


Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)