VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rrbIffDecoder.h
Go to the documentation of this file.
1 #if DtHLA
2 
3 #ifndef DtRRBIffDecoder_H_
4 #define DtRRBIffDecoder_H_
5 
6 #include "iffDecoder.h"
8 
12 
15 
19 #define DtDECLARE_RRB_IFF_ATTR_DECODER(attrName) \
20  DtDECLARE_ATTR_DECODER(DtIffStateRepository, attrName)
21 
29 #define DtDEFINE_SIMPLE_RRB_IFF_ATTR_DECODER( \
30  attrName, netType, inspector) \
31  DtDEFINE_SIMPLE_RRB_IFF_ATTR_DECODER_WITH_CAST( \
32  attrName, netType, inspector, (netType))
33 
41 #define DtDEFINE_SIMPLE_RRB_ATTR_DECODER_WITH_CAST( \
42  decClass, stateRepClass, attrName, netType, mutator, castExpr) \
43 void decClass::decode##attrName( \
44  stateRepClass* stateRep, \
45  const RTI::AttributeHandleValuePairSet& attrs, \
46  int index) \
47 { \
48  RTI::ULong length = 0; \
49  netType* netValPtr = (netType*)attributeData(attrs, index, length, sizeof(netType), #attrName); \
50  if (netValPtr) \
51  { \
52  stateRep->rrb()->mutator(castExpr *netValPtr); \
53  } \
54 }
55 
61 #define DtDEFINE_SIMPLE_RRB_IFF_ATTR_DECODER_WITH_CAST( \
62  attrName, netType, mutator, castExpr) \
63  DtDEFINE_SIMPLE_RRB_ATTR_DECODER_WITH_CAST( \
64  DtRRBIffDecoder, DtIffStateRepository, \
65  attrName, netType, mutator, castExpr)
66 
67 
68 class DT_DLL_VL DtRRBIffDecoder : public DtIffDecoder
69 {
70 public:
72  DtRRBIffDecoder(
73  DtExerciseConn* exConn,
74  DtObjClassDesc* classDesc);
75 
77  virtual ~DtRRBIffDecoder();
78 
80  DtRRBIffDecoder(const DtRRBIffDecoder& orig);
81 
83  DtRRBIffDecoder& operator=(const DtRRBIffDecoder& orig);
84 
85 public:
86 
87  static DtHlaStateDecoder* create(
88  DtExerciseConn* exConn,
89  DtObjClassDesc* classDesc);
90 
91 protected:
92 
93  DtDECLARE_RRB_IFF_ATTR_DECODER(Code);
94  DtDECLARE_RRB_IFF_ATTR_DECODER(IsDamaged);
95  DtDECLARE_RRB_IFF_ATTR_DECODER(IsMalfunctioning);
96  DtDECLARE_RRB_IFF_ATTR_DECODER(IsOn);
97  DtDECLARE_RRB_IFF_ATTR_DECODER(PowerReduction);
98  DtDECLARE_RRB_IFF_ATTR_DECODER(RadarEnhancement);
99  DtDECLARE_RRB_IFF_ATTR_DECODER(PowerReductionIsOn);
100  DtDECLARE_RRB_IFF_ATTR_DECODER(RadarEnhancementIsOn);
101 };
102 
103 #endif
104 #endif
105 
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnDIS.h:62
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
Instances of DtRRBStateRepository are used to store state data for IFFData.RRB objects.
Definition: iffRRBStateRepository.h:29

Document ID: Generated on Thu Sep 19 02:12:35 EDT 2024 from SVN revision 269601
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)