MAK Data Logger API Documentation for HLA
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
objectHistoryRepository.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2024 MAK Technologies, Inc
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: objectHistoryRepository.h,v $ $Revision: 266449 $ $State: Exp $
7 *********************************************************************/
8 
9 #pragma once
10 
12 
14 #include <vl/exerciseConn.h>
15 #include <vl/stateMsgHLA.h>
16 #include <vl/reflectedGenericObjectList.h>
17 
18 #include <QObject>
19 
20 #include <map>
21 
22 class DtDatatypeManager;
23 
24 // Add QT signals to object history
26 {
27 Q_OBJECT
28 public:
29  DtQtObjectHistory(const char* name, RTI::ObjectClassHandle classHandle,
30  DtHlaObject* obj, DtDatatypeManager& dm);
31  virtual ~DtQtObjectHistory();
32  virtual void updateAttributes(const DtStateMsg& msg);
33  virtual void forceUpdate();
34 signals:
36  void updatedObjectHistory(DtQtObjectHistory*);
37 };
38 
39 // Stores values for all known objects. This can be used to retrieve history information on any
40 // currently active object in an exercise.
42 {
43 Q_OBJECT
44 
45 public:
46 
49 
51  virtual ~DtObjectHistoryRepository();
52 
54  virtual void init(DtExerciseConn* ex);
55 
58  virtual DtQtObjectHistory* discoverObject(DtReflectedGenericObject* obj);
59 
61  virtual void removeObject(DtReflectedGenericObject* obj);
62 
65  virtual void reflectObjectUpdate(const DtStateMsg& msg, DtHlaObject* obj);
66 
68  virtual DtQtObjectHistory* getObjectHistoryRepositoryRep(DtString objectName);
69 
70 signals:
71 
72  // Emits whenever any object is updated.
73  void updatedObjectRepository(DtQtObjectHistory*);
74 
75 protected:
76 
77  // Copy constructor
79 
80  // Assignment Operator
82 
83 
84 protected:
85  std::map<DtString,DtQtObjectHistory*> myObjectHistories;
88 
89 };
DtDatatypeManager & myDatatypeManager
Definition: objectHistoryRepository.h:87
DtExerciseConn * myExerciseConn
Definition: objectHistoryRepository.h:86
This class handles the conversion between a byte stream and an English readable view of the data in a...
Definition: datatypeManager.h:41
Definition: objectHistory.h:36
std::map< DtString, DtQtObjectHistory * > myObjectHistories
Definition: objectHistoryRepository.h:85
virtual void updateAttributes(const DtStateMsg &msg)
Update the object history with the updates from the given update message.
virtual void forceUpdate()
Make known attributes dirty and emit as if updated.
Definition: objectHistoryRepository.h:41
#define DT_DLL_TRFCANLZR
Definition: trafficAnalyzerPlugin.h:18
Definition: objectHistoryRepository.h:25

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)