MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
objectHistory.h
Go to the documentation of this file.
1 /***************************************************************************
2 ** Copyright (c) 1992-2024 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
27 
28 #include <map>
29 #include <string>
30 #include <set>
31 
32 // This class only works if we actually have an HLA Connection
33 #ifdef DtHLA
34 
35 //This class contains information about a single object
37 {
38 public:
39 
41  DtObjectHistory(const char* name, RTI::ObjectClassHandle classHandle, DtHlaObject* obj,
42  DtDatatypeManager& dm);
43 
45  virtual ~DtObjectHistory();
46 
48  virtual const char * objectName() const;
49 
51  virtual RTI::ObjectClassHandle objectClassHandle() const;
52 
54  virtual DtHlaObject* hlaObject();
55 
57  virtual DtAttributeHistory* getAttribute(RTI::AttributeHandle handle);
58 
60  virtual DtStringTree* createStringTree(RTI::AttributeHandle handle, const DtDatatypeFedNode* omtNode);
61 
63  virtual void updateAttributes(const DtStateMsg& msg);
64 
66 #if DtHLA_1516
67  virtual const RTI::AttributeHandleSet& updatedAttributes() const;
68 #else
69  virtual const std::set<RTI::AttributeHandle>& updatedAttributes() const;
70 #endif
71 
73  virtual void forceUpdate();
74 
75 protected:
76 
79  virtual void setAttribute(RTI::AttributeHandle handle, const void* buffer, int length);
80 
82  virtual void setAttributes(const HandleValueMap& attrValues);
83 
84 protected:
85 
86  DtDatatypeManager& myDatatypeManager;
87  DtString myObjectName;
88  RTI::ObjectClassHandle myClassHandle;
89  DtHlaObject* myObject;
90  std::map<RTI::AttributeHandle, DtAttributeHistory*> myAttributes;
91 #if DtHLA_1516
92  RTI::AttributeHandleSet myUpdatedAttributes;
93 #else
94  std::set<RTI::AttributeHandle> myUpdatedAttributes;
95 #endif
96 };
97 
98 #endif
99 
100 
101 
This class handles the conversion between a byte stream and an English readable view of the data in a...
Definition: datatypeManager.h:41
#define DT_DLL_OMTREADER
Definition: omtReader.h:23
Basically a struct with a destructor, a string tree is a collection of indexed strings used to hold m...
Definition: stringTree.h:16
Represents an attribute inside a object class.
Definition: datatypeFedNode.h:21
Definition: attributeHistory.h:34
Contains DtAttributeHistory class.

Document ID: Generated on Fri May 31 15:45:35 EDT 2024 from SVN revision 266500
Copyright © 2024 MAK Technologies. All Rights Reserved (www.mak.com)