VR-Link API Documentation for HLA 1.3
objectHistory.h
Go to the documentation of this file.
1 /***************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ***************************************************************************/
7 #pragma once
8 
9 #pragma warning(disable : 4100)
10 #include <vlutil/vlMachineTypes.h>
11 #include "stringTree.h"
12 
13 //VR-Link Includes
14 #ifdef DtHLA_1516
15 #include "RTI/RTI1516.h"
16 #elif DtHLA
17 #include "RTI.hh"
18 #endif
19 #include <vl/hStateMsg.h>
20 #include <vl/genericSR.h>
21 #include <vl/rtiNamespace.h>
22 
23 
24 #include "attributeHistory.h"
25 
26 #include <map>
27 #include <string>
28 #include <set>
29 
30 #include <QtCore/QObject>
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  Q_OBJECT
39 
40 public:
41 
43  DtObjectHistory(const char* name, RTI::ObjectClassHandle classHandle, DtHlaObject* obj,
44  DtDatatypeManager& dm);
45 
47  virtual ~DtObjectHistory();
48 
50  virtual const char * objectName() const;
51 
53  virtual RTI::ObjectClassHandle objectClassHandle() const;
54 
56  virtual DtHlaObject* hlaObject();
57 
59  virtual DtAttributeHistory* getAttribute(RTI::AttributeHandle handle);
60 
62  virtual DtStringTree* createStringTree(RTI::AttributeHandle handle, const DtDatatypeFedNode* omtNode);
63 
65  virtual void updateAttributes(const DtStateMsg& msg);
66 
68  virtual void updateAttributes(DtGenericStateRepository& stateRep);
69 
71 #if DtHLA_1516
72  virtual const RTI::AttributeHandleSet& updatedAttributes() const;
73 #else
74  virtual const std::set<RTI::AttributeHandle>& updatedAttributes() const;
75 #endif
76 
78  virtual void forceUpdate();
79 
80 signals:
81 
83  void updatedObjectHistory(DtObjectHistory*);
84 
85 protected:
86 
89  virtual void setAttribute(RTI::AttributeHandle handle, const void* buffer, int length);
90 
92  virtual void setAttributes(const HandleValueMap& attrValues);
93 
94 protected:
95 
98  RTI::ObjectClassHandle myClassHandle;
100  std::map<RTI::AttributeHandle, DtAttributeHistory*> myAttributes;
101 #if DtHLA_1516
102  RTI::AttributeHandleSet myUpdatedAttributes;
103 #else
104  std::set<RTI::AttributeHandle> myUpdatedAttributes;
105 #endif
106 };
107 
108 #endif
109 

Document ID: Generated on Wed Aug 14 15:35:11 EDT 2013 from SVN revision 130445
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)