VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
spotReportDataProcessor.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
23 
26 
27 #pragma once
28 
29 #include <vrfGuiCore/vrfGuiCore.h>
30 
31 #include <vrvUtil/signalslib.h>
32 #include <vrvCore/DtUniqueID.h>
37 
38 #include <boost/bind.hpp>
39 
40 class DtSpotReport;
41 
42 namespace makVrv
43 {
44  class DtDe;
45  class DtSimEntryObjectAgent;
46  class DtSimObjectEntry;
47 }
48 
49 namespace makVrf
50 {
51  class DtSpotReportDataHandler;
52  class DtSpotReportDataHandlerCreatorInterface;
53  class DtVrfSimBackendManager;
54 
56  {
57  public:
58 
60  static DtSpotReportDataProcessor& instance(makVrv::DtDe& de);
61 
63  void forceObjectUpdate(makVrv::DtUniqueID uniqueId);
64 
65  public:
68  virtual void addSpotReportHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
69 
70  virtual void removeSpotReportHandler(const std::string& s);
71 
76  virtual std::string addOrUpdateSpotReport(const std::string& type, void* data, const std::string& key = "");
77 
79  virtual void removeSpotReport(makVrv::DtUniqueID id);
80 
82  virtual void removeAllSpotReports();
83 
85  virtual void resetFlushDataTime();
86 
88  virtual std::set<makVrv::DtUniqueID> observing(makVrv::DtUniqueID) const;
89 
91  virtual void setSuspended(bool);
92  bool suspended() const
93  {
94  return mySuspended;
95  }
96 
97  protected:
98  virtual DtSpotReportDataHandler* createSpotReportHandler(const std::string& s, makVrv::DtUniqueID) const;
99 
102  virtual std::string createSpotReport(const std::string& type, void* data, const std::string& key = "");
103 
104  protected:
106  virtual void processForceUpdateList();
107 
110  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& entry);
111 
113  virtual void tick();
114 
115  virtual void updateFlushTime();
116  virtual void updatePendingReports();
117 
118  protected:
121 
123  virtual ~DtSpotReportDataProcessor();
124 
125  protected:
126  typedef std::set<makVrv::DtUniqueID> SpotReportIdList;
127  typedef std::map<std::string, DtSpotReportDataHandlerCreatorInterface*> SpotReportHandlerCreators;
128  typedef std::map<std::string, DtSpotReportDataHandler*> SpotReportHandlers;
129  typedef std::map<makVrv::DtUniqueID, DtSpotReportDataHandler*> SpotReportHandlersById;
130 
132  makVrv::DtSimEntryObjectAgent* mySimEntryAgent;
138 
141 
144 
147 
149  {
150  PendingSpotReport() : report(0) {};
152  : type(orig.type), key(orig.key), report(orig.report)
153  {
154  }
155 
156  PendingSpotReport& operator=(const PendingSpotReport& orig)
157  {
158  type = orig.type;
159  key = orig.key;
160  report = orig.report;
161 
162  return *this;
163  }
164 
165  virtual ~PendingSpotReport() {};
166  std::string type;
167  std::string key;
169  };
170 
171  typedef std::vector<PendingSpotReport> PendingSpotReports;
172 
174 
175  std::set<makVrv::DtUniqueID> myPendingReportsToFlushData;
176  };
177 }

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)