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 
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
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 
92  RTI::ObjectClassHandle myClassHandle;
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

Document ID: Generated on Fri May 15 06:36:13 EDT 2015 from SVN revision 153263
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)