VR-Link API Documentation for HLA 1.3
 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-2010 VT MAK
3 ** All rights reserved.
4 ***************************************************************************/
7 #pragma once
8 
9 #pragma warning(disable : 4100)
10 #include <vlutil/vlMachineTypes.h>
11 
12 //VR-Link Includes
13 #ifdef DtHLA_1516
14 #include "RTI/RTI1516.h"
15 #elif DtHLA
16 #include "RTI.hh"
17 #endif
18 #include <vl/stateMsgHLA.h>
19 #include <vl/stateRepository.h>
20 #include <vl/rtiNamespace.h>
21 #include <omtReader/stringTree.h>
23 
24 #include <map>
25 #include <string>
26 #include <set>
27 
28 #include <QtCore/QObject>
29 
30 // This class only works if we actually have an HLA Connection
31 #ifdef DtHLA
32 
33 //This class contains information about a single object
35 {
36  Q_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 signals:
76 
78  void updatedObjectHistory(DtObjectHistory*);
79 
80 protected:
81 
84  virtual void setAttribute(RTI::AttributeHandle handle, const void* buffer, int length);
85 
87  virtual void setAttributes(const HandleValueMap& attrValues);
88 
89 protected:
90 
93  RTI::ObjectClassHandle myClassHandle;
95  std::map<RTI::AttributeHandle, DtAttributeHistory*> myAttributes;
96 #if DtHLA_1516
97  RTI::AttributeHandleSet myUpdatedAttributes;
98 #else
99  std::set<RTI::AttributeHandle> myUpdatedAttributes;
100 #endif
101 };
102 
103 #endif
104 

Document ID: Generated on Wed Jan 7 13:31:29 EST 2015 from SVN revision 149162
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)