VR-Forces Development_Version 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 #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  protected:
102  virtual DtSpotReportDataHandler* createSpotReportHandler(const std::string& s, makVrv::DtUniqueID) const;
103 
105  virtual bool createSpotReport(const std::string& type, void* data, const DtUUID&);
106 
107  protected:
109  virtual void processForceUpdateList();
110 
113  virtual void slot_simObjectEntryAboutToBeRemoved(makVrv::DtSimObjectEntry& entry);
114 
116  virtual void tick();
117 
118  virtual void updateFlushTime();
119  virtual void updatePendingReports();
120 
121  protected:
124 
126  virtual ~DtSpotReportDataProcessor();
127 
128  protected:
129  typedef std::set<makVrv::DtUniqueID> SpotReportIdList;
130  typedef std::map<std::string, DtSpotReportDataHandlerCreatorInterface*> SpotReportHandlerCreators;
131  typedef std::map<DtUUID, DtSpotReportDataHandler*> SpotReportHandlers;
132  typedef std::map<makVrv::DtUniqueID, DtSpotReportDataHandler*> SpotReportHandlersById;
133 
135  makVrv::DtSimEntryObjectAgent* mySimEntryAgent;
141 
144 
147 
150 
152  {
153  PendingSpotReport() : report(0) {};
155  : type(orig.type), key(orig.key), report(orig.report)
156  {
157  }
158 
159  PendingSpotReport& operator=(const PendingSpotReport& orig)
160  {
161  type = orig.type;
162  key = orig.key;
163  report = orig.report;
164 
165  return *this;
166  }
167 
168  virtual ~PendingSpotReport() {};
169  std::string type;
172  };
173 
174  typedef std::vector<PendingSpotReport> PendingSpotReports;
175 
177 
178  std::set<makVrv::DtUniqueID> myPendingReportsToFlushData;
179  };
180 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)