VR-Forces Development_Version 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 
54 
57  {
58  public:
60  virtual ~DtVrfSpotReportManager();
61 
63  static DtVrfSpotReportManager& instance(makVrv::DtDe& de);
64 
65  void setAutoSave(bool b);
66  bool autoSave() const;
67 
68  virtual void getRecord(DtVrfSpotReportsSettingsRecord& rec) const;
69 
71  virtual void setFromRecord(const DtVrfSpotReportsSettingsRecord& rec, bool updateFilter = true);
72 
75  virtual void requestSpotReports();
76 
78  virtual void requestSpotReportsFor(std::vector<int> forces);
79 
82  virtual void showPerspectiveForForce(const std::string&, bool autoSave = true);
83 
84  public:
85  //{@
88  void setDisplayReportingName(bool);
89  bool displayReportingName() const;
90 
91  void setDisplayObservedName(bool);
92  bool displayObservedName() const;
93 
94  void setDisplayLastContact(bool);
95  bool displayLastContact() const;
96 
97  void setDisplayLocation(bool);
98  bool displayLocation() const;
99 
100  void setDisplayVelocity(bool);
101  bool displayVelocity() const;
102 
103  void setDisplayContactRadius(bool);
104  bool displayContactRadius() const;
105 
106  void setDisplayContactRadiusIndicator(bool);
107  bool displayContactRadiusIndicator() const;
108 
109  void setDisplayHeading(bool);
110  bool displayHeading() const;
111 
112  void setDisplayEntityType(bool);
113  bool displayEntityType() const;
114 
115  void setDisplayHeadingIndicator(bool);
116  bool displayHeadingIndicator() const;
117 
118  void setDisplayVelocityIndicator(bool);
119  bool displayVelocityIndicator() const;
120 
121  void setApplyToEnvironmentals(bool);
122  bool applyToEnvironmentals() const;
123 
124  void setShowOnlyActiveEnvironmentals(bool);
125  bool showOnlyActiveEnvironmentals() const;
126 
127  const std::vector<int>& certaintyLevels() const;
128  void setCertaintyLevels(const std::vector<int>&);
129  void setCertaintyLevel(int level, int time);
130 
134  virtual bool showSpotReportsForForce(int) const;
135  virtual bool showGroundTruthForForce(int) const;
136 
138  virtual void setSpotReportGatherTime(double);
139  virtual double spotReportGatherTime() const;
140 
142  virtual void addShowSpotReportFor(int);
143  virtual void removeShowSpotReportFor(int);
144  void setShowSpotReportsForForce(const std::vector<int>&);
145  const std::vector<int> spotReportsFor() const;
146 
147  virtual void addShowGroundTruthFor(int);
148  virtual void removeShowGroundTruthFor(int);
149  void setShowGroundTruthForForce(const std::vector<int>&);
150  const std::vector<int> groundTruthFor() const;
151 
153  virtual void setDisplayFlag(int, bool);
154 
157  virtual void setSpotReportsGloballyEnabled(bool enabled);
158 
162  void setSystemEnabled(bool);
163  bool systemEnabled() const;
165 
166  public:
168  virtual void loadDefaults(bool fromFactory = false);
169 
171  virtual void saveAsDefaults();
172 
173  const makVrv::DtRecordSettingsBackupInterface* settingsBackup() const
174  {
175  return mySettingsBackup;
176  }
177 
179  {
180  return mySettingsBackup;
181  }
182 
184  void exportSettings(const std::string& fileName);
185 
187  void importSettings(const std::string& fileName);
188 
189  virtual void processReceiveSpotReport(const DtVrfObjectMessage* msg);
190  virtual void processReceiveSpotReports(const DtVrfObjectMessage* msg);
191 
196  virtual bool addOrUpdateSpotReport(const std::string& type, void*, const DtUUID&);
197 
198  public:
201  virtual void addFogOfWarFilter(const DtVrfSelectionFilter&);
202 
205  virtual void removeFogOfWarFilter(const std::string&);
206 
208  virtual bool passesFogOfWarFilters(const makVrv::DtVrlinkSimulatedBaseState*) const;
209  virtual bool passesFogOfWarFilters(makVrv::DtUniqueID) const;
210 
212  virtual bool canShowScenarioEvent(makVrv::DtUniqueID) const;
213 
215  virtual bool blockSignals(bool);
216 
217  public:
220  virtual void addSpotReportDataHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
221 
223  virtual void removeSpotReport(makVrv::DtUniqueID);
224 
225  virtual void removeSpotReportDataHandler(const std::string& s);
226 
228  virtual void setSpotReportsSelectable(bool);
229  virtual bool spotReportsSelectable() const;
230 
233  virtual int certaintyLevelForTime(double d) const;
234 
236  virtual void reset();
237 
238  public:
241  virtual void addSpotReportVisualHandler(const std::string& s, DtSpotReportVisualHandlerCreatorInterface*);
242 
243  virtual void removeSpotReportVisualHandler(const std::string& s);
244 
245  public:
247  boost::signal<void (const DtVrfSpotReportsSettingsRecord&)> signal_spotReportOptionsChanged;
248 
250  boost::signal<void (bool)> signal_spotReportsSelectableChanged;
251 
253  boost::signal<void (DtVrfSpotReportVisualizer*)> signal_spotReportCreated;
254 
255  protected:
258  virtual void constructSpotReportDictionary();
259 
263  virtual bool upgradeFromDictionary(makVrv::DtElementDefinitionTypeManager::ElementDefinitionType dictType,
264  bool force = false, const makVrv::DtUnicode& unknownName = makVrv::DtUnicode::fromAscii("Unknown"));
265 
267  virtual void mergeItemsFrom(const makVrv::DtElementDefinitionNew* source, makVrv::DtElementDefinitionNew* spotReport,
268  const std::vector<int>& supportedSets);
269 
270  virtual bool isUnusedVisualizer(const makVrv::DtVisualizerDefinition*) const;
271 
272  virtual void enableDecoration(const std::string&, bool);
273  virtual bool decorationIsEnabled(const std::string&) const;
274 
275  protected:
280 
282  std::set<unsigned long> mySpotReportRequestIds;
283  std::set<int> myAlreadyRequested;
284  std::map<std::string, DtVrfSelectionFilter*> myModified;
285  std::set<std::string> myRemoved;
286 
288  };
289 }

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)