VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vrfSpotReportManager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
17 
18 #pragma once
19 
20 #include <vrfGuiCore/vrfGuiCore.h>
25 #include <vrvUtil/signalslib.h>
26 #include <vrfutil/rwUUID.h>
27 
29 #include <vrvCore/DtEntityState.h>
30 
31 #include <boost/signal.hpp>
32 
33 class DtVrfObjectMessage;
34 
35 namespace makVrv
36 {
37  class DtDe;
38  class DtRecordSettingsBackupInterface;
39  class DtObjectDictionary;
40  class DtSharedSettingsManager;
41  class DtElementDefinitionNew;
42  class DtVisualizerDefinition;
43 }
44 
45 namespace makVrf
46 {
47  class DtSpotReportDataHandlerCreatorInterface;
48  class DtSpotReportVisualHandlerCreatorInterface;
49  class DtVrfSelectionFilter;
50  class DtVrfSpotReportVisualizer;
51  struct DtVrfObjectDataState;
52 
55 
58  {
59  public:
61  virtual ~DtVrfSpotReportManager();
62 
64  static DtVrfSpotReportManager& instance(makVrv::DtDe& de);
65 
66  void setAutoSave(bool b);
67  bool autoSave() const;
68 
69  virtual void getRecord(DtVrfSpotReportsSettingsRecord& rec) const;
70 
73  virtual void getSplitRecord(std::vector<DtVrfSpotReportsSettingsRecord>& rec,
74  std::vector<std::string>& fileNames) {};
75 
78  virtual void addRecords(DtVrfSpotReportsSettingsRecord& recs,
79  DtVrfSpotReportsSettingsRecord& combinedRec) {};
80 
82  virtual void setFromRecord(const DtVrfSpotReportsSettingsRecord& rec, bool updateFilter = true);
83 
86  virtual void requestSpotReports();
87 
89  virtual void requestSpotReportsFor(std::vector<int> forces);
90 
93  virtual void showPerspectiveForForce(const std::string&, bool autoSave = true);
94 
95  public:
96  //{@
99  void setDisplayReportingName(bool);
100  bool displayReportingName() const;
101 
102  void setDisplayObservedName(bool);
103  bool displayObservedName() const;
104 
105  void setDisplayLastContact(bool);
106  bool displayLastContact() const;
107 
108  void setDisplayLocation(bool);
109  bool displayLocation() const;
110 
111  void setDisplayVelocity(bool);
112  bool displayVelocity() const;
113 
114  void setDisplayContactRadius(bool);
115  bool displayContactRadius() const;
116 
117  void setDisplayContactRadiusIndicator(bool);
118  bool displayContactRadiusIndicator() const;
119 
120  void setDisplayHeading(bool);
121  bool displayHeading() const;
122 
123  void setDisplayEntityType(bool);
124  bool displayEntityType() const;
125 
126  void setDisplayHeadingIndicator(bool);
127  bool displayHeadingIndicator() const;
128 
129  void setDisplayVelocityIndicator(bool);
130  bool displayVelocityIndicator() const;
131 
132  void setApplyToEnvironmentals(bool);
133  bool applyToEnvironmentals() const;
134 
135  void setShowOnlyActiveEnvironmentals(bool);
136  bool showOnlyActiveEnvironmentals() const;
137 
138  const std::vector<int>& certaintyLevels() const;
139  void setCertaintyLevels(const std::vector<int>&);
140  void setCertaintyLevel(int level, int time);
141 
145  virtual bool showSpotReportsForForce(int) const;
146  virtual bool showGroundTruthForForce(int) const;
147 
149  virtual void setSpotReportGatherTime(double);
150  virtual double spotReportGatherTime() const;
151 
153  virtual void addShowSpotReportFor(int);
154  virtual void removeShowSpotReportFor(int);
155  void setShowSpotReportsForForce(const std::vector<int>&);
156  const std::vector<int> spotReportsFor() const;
157 
158  virtual void addShowGroundTruthFor(int);
159  virtual void removeShowGroundTruthFor(int);
160  void setShowGroundTruthForForce(const std::vector<int>&);
161  const std::vector<int> groundTruthFor() const;
162 
164  virtual void setDisplayFlag(int, bool);
165 
168  virtual void setSpotReportsGloballyEnabled(bool enabled);
169 
173  void setSystemEnabled(bool);
174  bool systemEnabled() const;
176 
177  public:
179  virtual void loadDefaults(bool fromFactory = false);
180 
182  virtual void saveAsDefaults();
183 
184  const makVrv::DtRecordSettingsBackupInterface* settingsBackup() const
185  {
186  return mySettingsBackup;
187  }
188 
190  {
191  return mySettingsBackup;
192  }
193 
195  void exportSettings(const std::string& fileName);
196 
198  void importSettings(const std::string& fileName);
199 
200  virtual void processReceiveSpotReport(const DtVrfObjectMessage* msg);
201  virtual void processReceiveSpotReports(const DtVrfObjectMessage* msg);
202 
207  virtual bool addOrUpdateSpotReport(const std::string& type, void*, const DtUUID&);
208 
209  public:
212  virtual void addFogOfWarFilter(const DtVrfSelectionFilter&);
213 
216  virtual void removeFogOfWarFilter(const std::string&);
217 
219  virtual bool passesFogOfWarFilters(const makVrv::DtVrlinkSimulatedBaseState*, const DtVrfObjectDataState* objState = 0) const;
220  virtual bool passesFogOfWarFilters(makVrv::DtUniqueID) const;
221 
223  virtual bool canShowScenarioEvent(makVrv::DtUniqueID) const;
224 
226  virtual bool blockSignals(bool);
227 
228  public:
231  virtual void addSpotReportDataHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
232 
234  virtual void removeSpotReport(makVrv::DtUniqueID);
235 
236  virtual void removeSpotReportDataHandler(const std::string& s);
237 
239  virtual void setSpotReportsSelectable(bool);
240  virtual bool spotReportsSelectable() const;
241 
244  virtual int certaintyLevelForTime(double d) const;
245 
247  virtual void reset();
248 
249  public:
252  virtual void addSpotReportVisualHandler(const std::string& s, DtSpotReportVisualHandlerCreatorInterface*);
253 
254  virtual void removeSpotReportVisualHandler(const std::string& s);
255 
256  public:
258  boost::signal<void (const DtVrfSpotReportsSettingsRecord&)> signal_spotReportOptionsChanged;
259 
261  boost::signal<void (bool)> signal_spotReportsSelectableChanged;
262 
264  boost::signal<void (DtVrfSpotReportVisualizer*)> signal_spotReportCreated;
265 
266  protected:
267 
268  virtual void enableDecoration(const std::string&, bool);
269  virtual bool decorationIsEnabled(const std::string&) const;
270 
271  protected:
276 
278  std::set<unsigned long> mySpotReportRequestIds;
279  std::set<int> myAlreadyRequested;
280  std::map<std::string, DtVrfSelectionFilter*> myModified;
281  std::set<std::string> myRemoved;
282 
284  };
285 }

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)