VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros
iffEncoder.h File Reference

This file provides a declaration of the class DtIffEncoder. More...

Go to the source code of this file.

Classes

class  DtIffEncoder
 The DtIffEncoder class: More...

Macros

#define DtDECLARE_IFF_ATTR_CHECKER(attrName)   DtDECLARE_ATTR_CHECKER(DtIffStateRepository, attrName)
 We define several macros that can be helpful in defining the class, and the individual decoding functions.
#define DtDECLARE_IFF_ATTR_ENCODER(attrName)   DtDECLARE_ATTR_ENCODER(DtIffStateRepository, attrName)
 This is used to declare static member functions that perform attribute encoding.
#define DtDEFINE_SIMPLE_IFF_ATTR_ENCODER(attrName, netType, inspector)
 This macro is used to define simple attribute encoding functions (members of a derived DtHlaStateEncoder that encode individual attributes).
#define DtDEFINE_SIMPLE_IFF_ATTR_CHECKER(attrName, inspector)
 This macro is used to define simple attribute checking functions (members of a derived DtHlaStateEncoder that check whether a particular attribute's update condition has been met.
#define DtDEFINE_SIMPLE_IFF_ATTR_ENCODER_WITH_PARAM(encClass, attrName, netType, inspector, param)
 This macro is used to define simple attribute encoder functions (members of a derived DtHlaStateEncoder that encode individual attributes).
#define DtDEFINE_SIMPLE_IFF_ATTR_CHECKER_WITH_PARAM(encClass, attrName, inspector, param)
 This macro is used to define simple attribute checker functions (members of a derived DtHlaStateEncoder that check whether a particular attribute is out of date.) The simple implementation is to just compare the values returned by the two StateReps' inspector functions.

Detailed Description

This file provides a declaration of the class DtIffEncoder.

Macro Definition Documentation

#define DtDECLARE_IFF_ATTR_CHECKER (   attrName)    DtDECLARE_ATTR_CHECKER(DtIffStateRepository, attrName)

We define several macros that can be helpful in defining the class, and the individual decoding functions.

This one is used to declare static member functions for determining whether or not an attribute's update condition has been met.

#define DtDECLARE_IFF_ATTR_ENCODER (   attrName)    DtDECLARE_ATTR_ENCODER(DtIffStateRepository, attrName)

This is used to declare static member functions that perform attribute encoding.

#define DtDEFINE_SIMPLE_IFF_ATTR_CHECKER (   attrName,
  inspector 
)
Value:

This macro is used to define simple attribute checking functions (members of a derived DtHlaStateEncoder that check whether a particular attribute's update condition has been met.

The "simple" implementation is to just compare the values returned by the two StateReps' inspector functions to see if they differ.

#define DtDEFINE_SIMPLE_IFF_ATTR_CHECKER_WITH_PARAM (   encClass,
  attrName,
  inspector,
  param 
)
Value:
bool encClass::need##attrName(const DtIffStateRepository& stateRep, \
const DtIffStateRepository& asSeenByRemote) \
{ \
return (bool) !(stateRep.inspector(param) == \
asSeenByRemote.inspector(param)); \
}

This macro is used to define simple attribute checker functions (members of a derived DtHlaStateEncoder that check whether a particular attribute is out of date.) The simple implementation is to just compare the values returned by the two StateReps' inspector functions.

#define DtDEFINE_SIMPLE_IFF_ATTR_ENCODER (   attrName,
  netType,
  inspector 
)
Value:

This macro is used to define simple attribute encoding functions (members of a derived DtHlaStateEncoder that encode individual attributes).

The "simple" encoding is just to implicitly convert the value returned by the inspector to a netType, and add it to the ahvps.

#define DtDEFINE_SIMPLE_IFF_ATTR_ENCODER_WITH_PARAM (   encClass,
  attrName,
  netType,
  inspector,
  param 
)
Value:
void encClass::encode##attrName(const DtIffStateRepository& rep, \
RTI::AttributeHandle attrHandle) \
{ \
netType netVal; \
netVal = rep.inspector(param); \
attrs->add(attrHandle, (char*) &netVal, sizeof(netType)); \
}

This macro is used to define simple attribute encoder functions (members of a derived DtHlaStateEncoder that encode individual attributes).

The simple encoding is just to implicitly convert the value returned by the inspector to a netType, and add it to the ahvps.


Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)