29 { printf(
"\n===================\n"
30 "Constructing DtF18EntityStateRep\n"
31 "=====================\n"); }
88 const RTI::AttributeHandleValuePairSet& attrs,
91 RTI::ULong length = attrs.getValueLength(pairSetIndex);
93 if (length == 0)
return;
96 attrs.getValue(pairSetIndex, buffer, length);
97 buffer[length] =
'\0';
133 RTI::AttributeHandleValuePairSet* avList,
134 RTI::AttributeHandle attrHandle)
138 avList->add(attrHandle,
147 #define DtADD_ENCODER(className, derivedEnc) \
149 DtObjClassDesc* classDesc = exConn.fom()->objClassByName(#className); \
152 exConn.fomMapper()->stateEncoderFactory()->addEncoder( \
153 classDesc->handle(), new derivedEnc(&exConn, classDesc)); \
157 DtWarn("Can't add encoder for object class %s: Not in FOM.\n", #className); \
162 #define DtADD_DECODER(className, derivedDec) \
164 DtObjClassDesc* classDesc = exConn.fom()->objClassByName(#className); \
167 exConn.fomMapper()->stateDecoderFactory()->addDecoder( \
168 classDesc->handle(), new derivedDec(&exConn, classDesc)); \
172 DtWarn("Can't add decoder for object class %s: Not in FOM.\n", #className); \
181 printf(
"=========\n");
182 printf(
" In Class Chooser, deciding which entity Type to publish\n");
183 printf(
"=========\n");
192 printf(
"Choosing F18 Type, we will use the new class!\n");
194 return "BaseEntity.PhysicalEntity.Platform.Aircraft.F18";
virtual ~DtF18EntityStateRep()
Destructor.
Definition: patch.h:34
DtString myAttrib
Definition: patch.h:53
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnHLA.h:60
DtAttributeEncoder addEncoder(RTI::AttributeHandle hand, DtAttributeEncoder func)
Add/Remove an encoding function for the attribute specified by handle.
An example subclass of DtPlatformEncoder for use with DtF18EntityStateRep.
Definition: patch.h:107
Contains the DtString class declaration.
void(* DtAttributeDecoder)(DtStateRepository *stateRep, const RTI::AttributeHandleValuePairSet &avlist, unsigned long pairSetIndex)
Attribute decoding function declaration.
Definition: hlaStateDecoder.h:51
char * DtF18EntityChooser(const char *vrlinkClassName, DtExerciseConn *exConn, void *usr)
Definition: patch.h:177
This file declares enumerations for use with DtEntityType.
void(* DtAttributeEncoder)(const DtStateRepository &stateRep, RTI::AttributeHandleValuePairSet *avList, RTI::AttributeHandle handle)
Attribute encoding function declaration.
Definition: hlaStateEncoder.h:50
DT_DLL_VLPROTIND char * DtDecodingBuffer(unsigned int requestedLength)
DtDecodingBuffer returns a pointer to a chunk of memory requestedLength long which can be used for de...
This file declares DtFomMapper.
static void encodeSpecialF18Attribute(const DtF18EntityStateRep &stateRep, RTI::AttributeHandleValuePairSet *avList, RTI::AttributeHandle attrHandle)
Definition: patch.h:132
int subCategory() const
Definition: entityType.h:88
DtF18EntityStateRep & operator=(const DtF18EntityStateRep &orig)
assignment operator – Not Implemented
DtF18EntityEncoder(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
Constructor that registers the new attributes.
Definition: patch.h:111
An instance of DtObjClassDesc is a "class descriptor" for an HLA Object class.
Definition: objClassDesc13.h:41
static bool needSpecialF18Attribute(const DtF18EntityStateRep &stateRep, const DtF18EntityStateRep &asSeenByRemote)
Definition: patch.h:126
This file declares DtFom.
DtF18EntityDecoder(DtExerciseConn *exConn, DtObjClassDesc *classDesc)
Ctor.
Definition: patch.h:69
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:37
DtAttributeChecker addChecker(RTI::AttributeHandle hand, DtAttributeChecker func)
Add/Remove a checker function for the attribute specified by handle.
Definition: entityTypes.h:219
Contains the DtEntityStateRepository class declaration.
virtual DtString f18Attribute() const
The new attribute string.
Definition: patch.h:49
virtual ~DtF18EntityDecoder()
destructor
Definition: patch.h:80
virtual const char * c_str() const
Returns a char* representation of the DtString;.
static DtF18EntityStateRep * create()
Need this so that reflected Lists will know how to create an instance of the DtF18EntityStateRep.
Definition: patch.h:53
virtual void setF18Attribute(const DtString &val)
Set the new attribute string.
Definition: patch.h:47
static char * dfltEntityClassChooser(const char *vrlinkClassName, DtExerciseConn *exConn, void *usr)
The default entity class chooser function.
An example subclass of the DtEntityStateRepository.
Definition: patch.h:22
DtF18EntityStateRep()
Constructor.
Definition: patch.h:26
static void decodeSpecialF18Attribute(DtF18EntityStateRep *stateRep, const RTI::AttributeHandleValuePairSet &attrs, int pairSetIndex)
all Encoder/Decoder classes need to be static.
Definition: patch.h:87
An example subclass of DtPlatformDecoder for use with DtF18EntityStateRep.
Definition: patch.h:65
DtAttributeDecoder addDecoder(RTI::AttributeHandle h, DtAttributeDecoder func)
Add/Remove a decoding function for the attribute specified by handle.
Instances of DtString are used to represent strings.
Definition: vlString.h:29
virtual int size() const
size() - returns the length of the string not including the terminating '\0'
bool(* DtAttributeChecker)(const DtStateRepository &stateRep, const DtStateRepository &asSeenByRemote)
Attribute checking function declaration.
Definition: hlaStateEncoder.h:56
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26
This file contains the declaration of DtStateDecoderFactory.
virtual ~DtF18EntityEncoder()
Definition: patch.h:122