MAK Data Logger API Documentation for DIS
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 
29 #include <QtCore/QObject>
30 
31 // This class only works if we actually have an HLA Connection
32 #ifdef DtHLA
33 
34 //This class contains information about a single object
36 {
37  Q_OBJECT
38 
39 public:
40 
42  DtObjectHistory(const char* name, RTI::ObjectClassHandle classHandle, DtHlaObject* obj,
43  DtDatatypeManager& dm);
44 
46  virtual ~DtObjectHistory();
47 
49  virtual const char * objectName() const;
50 
52  virtual RTI::ObjectClassHandle objectClassHandle() const;
53 
55  virtual DtHlaObject* hlaObject();
56 
58  virtual DtAttributeHistory* getAttribute(RTI::AttributeHandle handle);
59 
61  virtual DtStringTree* createStringTree(RTI::AttributeHandle handle, const DtDatatypeFedNode* omtNode);
62 
64  virtual void updateAttributes(const DtStateMsg& msg);
65 
67  virtual void updateAttributes(DtGenericStateRepository& stateRep);
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 signals:
80 
82  void updatedObjectHistory(DtObjectHistory*);
83 
84 protected:
85 
88  virtual void setAttribute(RTI::AttributeHandle handle, const void* buffer, int length);
89 
91  virtual void setAttributes(const HandleValueMap& attrValues);
92 
93 protected:
94 
95  DtDatatypeManager& myDatatypeManager;
96  DtString myObjectName;
97  RTI::ObjectClassHandle myClassHandle;
98  DtHlaObject* myObject;
99  std::map<RTI::AttributeHandle, DtAttributeHistory*> myAttributes;
100 #if DtHLA_1516
101  RTI::AttributeHandleSet myUpdatedAttributes;
102 #else
103  std::set<RTI::AttributeHandle> myUpdatedAttributes;
104 #endif
105 };
106 
107 #endif
108 

Document ID: Generated on Mon Jan 19 08:20:14 EST 2015 from SVN revision 149581
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)