20 class DT_DLL_VL DtLinearObjectTransactionDecoder :
public DtEnvironmentObjectTransactionDecoder
25 DtLinearObjectTransactionDecoder(
DtExerciseConn* exConn, DtInterClassDesc* classDesc);
28 DtLinearObjectTransactionDecoder(
const DtLinearObjectTransactionDecoder& orig);
31 virtual ~DtLinearObjectTransactionDecoder();
34 DtLinearObjectTransactionDecoder& operator=(
const DtLinearObjectTransactionDecoder& orig);
38 template <
typename SegmentRecordType,
typename SegmentRecordNetType,
39 typename CountMutator,
typename SegmentMutator>
40 static void decodeSegmentRecords(DtLinearObjectTransaction* inter,
41 const RTI::ParameterHandleValuePairSet& params,
int index,
42 CountMutator countMutator, SegmentMutator segmentMutator);
45 template <
typename SegmentRecordType,
typename SegmentRecordNetType,
46 typename CountMutator,
typename SegmentMutator>
47 void DtLinearObjectTransactionDecoder::decodeSegmentRecords(
48 DtLinearObjectTransaction* inter,
49 const RTI::ParameterHandleValuePairSet& params,
51 CountMutator countMutator,
52 SegmentMutator segmentMutator)
54 RTI::ULong length = 0;
55 char* buffer = parameterData(params, index, length);
59 (inter->*countMutator)(0);
63 if (length %
sizeof(SegmentRecordNetType) != 0)
65 DtWarn(
"Can't decode SegmentRecords : Size %d not a multiple of the size of a parameter (%d).\n",
66 length,
sizeof(SegmentRecordNetType));
68 (inter->*countMutator)(0);
72 int numSegs = length /
sizeof(SegmentRecordNetType);
73 (inter->*countMutator)(numSegs);
75 for (
int segCount = 0; segCount < numSegs; ++segCount)
77 SegmentRecordNetType* netSegPtr = (SegmentRecordNetType*)buffer;
78 SegmentRecordType rec;
81 (inter->*segmentMutator)(segCount, rec);
82 buffer +=
sizeof(SegmentRecordNetType);
Instances of DtExerciseConn are used to provide an application's interface or connection to the netwo...
Definition: exerciseConnDIS.h:63
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
DtOutputStream DtWarn
These DtOutputStream instances are used for all print messaging in VR-Link.