VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
linearObjectTransactionEncoder.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2026 MAK Technologies, Inc
3 ** All rights reserved.
4 *******************************************************************************/
5 
9 
10 #pragma once
11 
12 #if DtHLA
13 
16 
17 #include <vector>
18 
23 {
24 public:
25 
28 
31 
34 
37 
38 protected:
39 
40  template <typename SegmentRecordType, typename SegmentRecordNetType,
41  typename CountFunction, typename SegmentFunction>
42  static void encodeSegmentRecords(const DtLinearObjectTransaction& inter,
43  RTI::ParameterHandleValuePairSet* params, RTI::ParameterHandle paramHandle,
44  CountFunction countFunction, SegmentFunction segmentFunction);
45 };
46 
47 template <typename SegmentRecordType, typename SegmentRecordNetType,
48  typename CountFunction, typename SegmentFunction>
50  const DtLinearObjectTransaction& inter,
52  RTI::ParameterHandle paramHandle,
53  CountFunction countFunction,
54  SegmentFunction segmentFunction)
55 {
56  int count = (inter.*countFunction)();
57  std::vector<SegmentRecordNetType> netVals(count);
58 
59  for (int index = 0; index < count; ++index)
60  {
61  SegmentRecordType localSegment;
62  (inter.*segmentFunction)(index, localSegment);
63  localSegment.loadNetRecord(netVals[index]);
64  }
65 
66  params->add(paramHandle, (char*)netVals.data(), count * sizeof(SegmentRecordNetType));
67 }
68 
69 #endif // DtHLA
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:62
#define DT_DLL_VL
Definition: vlMachineTypes.h:120
void add(HandleType h, const char *buffer, unsigned long valueLength)
Instances of DtInterClassDesc are used to represent HLA Object and Interaction classes.
Definition: interClassDesc.h:33
This file provides a declaration of the class DtLinearObjectTransaction.
DtEnvironmentObjectTransactionEncoder & operator=(const DtEnvironmentObjectTransactionEncoder &orig)
assignment operator
class DtLinearObjectTransaction
Definition: linearObjectTransaction.h:47
DtLinearObjectTransactionEncoder is the base class for HLA environment object transaction encoders th...
Definition: linearObjectTransactionEncoder.h:22
static void encodeSegmentRecords(const DtLinearObjectTransaction &inter, RTI::ParameterHandleValuePairSet *params, RTI::ParameterHandle paramHandle, CountFunction countFunction, SegmentFunction segmentFunction)
Definition: linearObjectTransactionEncoder.h:49
This file provides a declaration of the class DtEnvironmentObjectTransactionEncoder.
class DtEnvironmentObjectTransactionEncoder:
Definition: environmentObjectTransactionEncoder.h:28
Used to provide backwards compatibility for VR-Link Encoders and Decoders who use either AttributeHan...
Definition: rtiCompatibility.h:237

Document ID: Generated on Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)