7 #ifndef DtBaseEntityDecoder_H_
8 #define DtBaseEntityDecoder_H_
23 #define DtDECLARE_ENTITY_ATTR_DECODER(attrName) \
24 DtDECLARE_ATTR_DECODER(DtEntityStateRepository, attrName)
28 #define DtDECLARE_AGGREGATE_ATTR_DECODER(attrName) \
29 DtDECLARE_ATTR_DECODER(DtAggregateStateRepository, attrName)
33 #define DtDECLARE_BASE_ENTITY_ATTR_DECODER(attrName) \
34 DtDECLARE_ATTR_DECODER(DtBaseEntityStateRepository, attrName)
121 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER_WITH_CAST( \
122 attrName, netType, mutator, castExpr) \
123 DtDEFINE_SIMPLE_ATTR_DECODER_WITH_CAST( \
124 DtBaseEntityDecoder, DtBaseEntityStateRepository, \
125 attrName, netType, mutator, castExpr)
127 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER( \
128 attrName, netType, inspector) \
129 DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER_WITH_CAST( \
130 attrName, netType, inspector, (netType))
138 #define DtDEFINE_SIMPLE_BASE_ENTITY_ATTR_DECODER_MUTATOR_WITH_TIME( \
139 attrName, netType, mutator) \
140 void DtBaseEntityDecoder::decode##attrName( \
141 DtBaseEntityStateRepository* stateRep, \
142 const RTI::AttributeHandleValuePairSet& attrs, \
145 RTI::ULong length = attrs.getValueLength(index); \
146 if (length < sizeof(netType)) \
148 DtWarn("Cannot decode attribute %s.\n" \
149 "Size of data (%d) is smaller than size of %s (%d).\n", \
150 #attrName, length, #netType, sizeof(netType)); \
153 else if (length > sizeof(netType) && DtNotifyLevel >= DtNlVerbose) \
155 DtVerbose("When decoding attribute %s,\n" \
156 "found size of data (%d) is larger than size of %s (%d).\n", \
157 #attrName, length, #netType, sizeof(netType)); \
161 attrs.getValue(index, (char*) &netVal, length); \
162 stateRep->mutator(netVal, stateRep->timeForSets()); \
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:60
#define DT_DLL_VL
Definition: vlMachineTypes.h:108
Instances of DtBaseEntityDecoder are used to decode a base entity state message into a state reposito...
Definition: baseEntityDecoder.h:41
Instances of DtBaseEntityStateRepository are used to maintain basic state information needed by all k...
Definition: baseEntityStateRepository.h:36
#define DtDECLARE_BASE_ENTITY_ATTR_DECODER(attrName)
This is used to declare attribute decoding functions which are members of the class.
Definition: baseEntityDecoder.h:33
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class.
Definition: objClassDesc1516.h:41
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:37
DtHlaStateDecoder is used to provide decoding of a state message into a state repository in an HLA (a...
Definition: hlaStateDecoder.h:32
DtStateRepository is an abstract base class for maintaining state for an object.
Definition: stateRepository.h:50
DtHlaStateDecoder & operator=(const DtHlaStateDecoder &orig)
assignment operator
virtual DtHlaStateDecoder * clone() const
Returns a new-ed clone of this object.
virtual void decode(const DtStateMsg &msg, DtStateRepository *stateRep) const
Decode the state message into the state repository.
class DtStateMsg:
Definition: stateMsgHLA.h:32
This file contains the declaration of DtHlaStateDecoder.