VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
objectHistory.h
Go to the documentation of this file.
1 /***************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 ***************************************************************************/
7 #pragma once
8 
9 
10 
11 #pragma warning(disable : 4100)
12 #include <vlutil/vlMachineTypes.h>
13 
14 //VR-Link Includes
15 #ifdef DtHLA_1516
16 #include "RTI/RTI1516.h"
17 #elif DtHLA
18 #include "RTI.hh"
19 #endif
20 #ifdef DtHLA
21 #include <vl/stateMsgHLA.h>
22 #include <vl/stateRepository.h>
23 #include <vl/rtiNamespace.h>
24 #endif
25 #include <omtReader/stringTree.h>
27 
28 #include <map>
29 #include <string>
30 #include <set>
31 
32 #ifdef DtUSE_UTILITIES_NAMESPACE
33 namespace DtUSE_UTILITIES_NAMESPACE
34 {
35 #endif
36 // This class only works if we actually have an HLA Connection
37 #ifdef DtHLA
38 
39 //This class contains information about a single object
40 class DT_DLL_OMTREADER DtObjectHistory
41 {
42 public:
43 
45  DtObjectHistory(const char* name, RTI::ObjectClassHandle classHandle, DtHlaObject* obj,
46  DtDatatypeManager& dm);
47 
49  virtual ~DtObjectHistory();
50 
52  virtual const char * objectName() const;
53 
55  virtual RTI::ObjectClassHandle objectClassHandle() const;
56 
58  virtual DtHlaObject* hlaObject();
59 
61  virtual DtAttributeHistory* getAttribute(RTI::AttributeHandle handle);
62 
64  virtual DtStringTree* createStringTree(RTI::AttributeHandle handle, const DtDatatypeFedNode* omtNode);
65 
67  virtual void updateAttributes(const DtStateMsg& msg);
68 
70 #if DtHLA_1516
71  virtual const RTI::AttributeHandleSet& updatedAttributes() const;
72 #else
73  virtual const std::set<RTI::AttributeHandle>& updatedAttributes() const;
74 #endif
75 
77  virtual void forceUpdate();
78 
79 protected:
80 
83  virtual void setAttribute(RTI::AttributeHandle handle, const void* buffer, int length);
84 
86  virtual void setAttributes(const HandleValueMap& attrValues);
87 
88 protected:
89 
90  DtDatatypeManager& myDatatypeManager;
91  DtString myObjectName;
92  RTI::ObjectClassHandle myClassHandle;
93  DtHlaObject* myObject;
94  std::map<RTI::AttributeHandle, DtAttributeHistory*> myAttributes;
95 #if DtHLA_1516
96  RTI::AttributeHandleSet myUpdatedAttributes;
97 #else
98  std::set<RTI::AttributeHandle> myUpdatedAttributes;
99 #endif
100 };
101 
102 #endif
103 
104 #ifdef DtUSE_UTILITIES_NAMESPACE
105 } // end of namespace DtUSE_UTILITIES_NAMESPACE
106 #endif
This class handles the conversion between a byte stream and an English readable view of the data in a...
Definition: datatypeManager.h:45
#define DT_DLL_OMTREADER
Definition: omtReader.h:27
Basically a struct with a destructor, a string tree is a collection of indexed strings used to hold m...
Definition: stringTree.h:20
Represents an attribute inside a object class.
Definition: datatypeFedNode.h:25
Definition: attributeHistory.h:38
Contains DtAttributeHistory class.
Instances of DtString are used to represent strings.
Definition: vlString.h:36
static const xmlChar * attrValues
Definition: xmlFedTags.h:152
Instances of DtStateMsg are used to represent state data communicated via the network in a DIS (as op...
Definition: stateMsgDIS.h:21
This file contains typedefs for machine dependant types.

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)