VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 #include <vrfutil/rwUUID.h>
38 
39 #include <boost/bind.hpp>
40 
41 class DtSpotReport;
42 
43 namespace makVrv
44 {
45  class DtDe;
46  class DtSimEntryObjectAgent;
47  class DtSimObjectEntry;
48 }
49 
50 namespace makVrf
51 {
52  class DtSpotReportDataHandler;
53  class DtSpotReportDataHandlerCreatorInterface;
54  class DtVrfSimBackendManager;
55 
57  {
58  public:
59 
61  static DtSpotReportDataProcessor& instance(makVrv::DtDe& de);
62 
64  void forceObjectUpdate(makVrv::DtUniqueID uniqueId);
65 
66  public:
69  virtual void addSpotReportHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
70 
71  virtual void removeSpotReportHandler(const std::string& s);
72 
76  virtual bool addOrUpdateSpotReport(const std::string& type, void* data, const DtUUID&);
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 
99  virtual double simTime() const;
100 
101  virtual bool isSpotReport(makVrv::DtUniqueID id) const;
102 
103  protected:
104  virtual DtSpotReportDataHandler* createSpotReportHandler(const std::string& s, makVrv::DtUniqueID) const;
105 
107  virtual bool createSpotReport(const std::string& type, void* data, const DtUUID&);
108 
109  protected:
111  virtual void processForceUpdateList();
112 
115  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& entry);
116 
118  virtual void tick();
119 
120  virtual void updateFlushTime();
121  virtual void updatePendingReports();
122  virtual DtVrfSimBackendManager& backendManager() const;
123 
124  protected:
127 
129  virtual ~DtSpotReportDataProcessor();
130 
131  protected:
132  typedef std::set<makVrv::DtUniqueID> SpotReportIdList;
133  typedef std::map<std::string, DtSpotReportDataHandlerCreatorInterface*> SpotReportHandlerCreators;
134  typedef std::map<DtUUID, DtSpotReportDataHandler*> SpotReportHandlers;
135  typedef std::map<makVrv::DtUniqueID, DtSpotReportDataHandler*> SpotReportHandlersById;
136 
138  makVrv::DtSimEntryObjectAgent* mySimEntryAgent;
144 
147 
150 
153 
155  {
156  PendingSpotReport() : report(0) {};
158  : type(orig.type), key(orig.key), report(orig.report)
159  {
160  }
161 
162  PendingSpotReport& operator=(const PendingSpotReport& orig)
163  {
164  type = orig.type;
165  key = orig.key;
166  report = orig.report;
167 
168  return *this;
169  }
170 
171  virtual ~PendingSpotReport() {};
172  std::string type;
175  };
176 
177  typedef std::vector<PendingSpotReport> PendingSpotReports;
178 
180 
181  std::set<makVrv::DtUniqueID> myPendingReportsToFlushData;
182  };
183 }

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)