VR-Forces 4.3.1 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 
28 #include <vrvCore/DtEntityState.h>
29 
30 #include <boost/signal.hpp>
31 
32 class DtVrfObjectMessage;
33 
34 namespace makVrv
35 {
36  class DtDe;
37  class DtRecordSettingsBackupInterface;
38  class DtObjectDictionary;
39  class DtSharedSettingsManager;
40  class DtElementDefinitionNew;
41  class DtVisualizerDefinition;
42 }
43 
44 namespace makVrf
45 {
46  class DtSpotReportDataHandlerCreatorInterface;
47  class DtSpotReportVisualHandlerCreatorInterface;
48  class DtVrfSelectionFilter;
49  class DtVrfSpotReportVisualizer;
50 
53 
56  {
57  public:
59  virtual ~DtVrfSpotReportManager();
60 
62  static DtVrfSpotReportManager& instance(makVrv::DtDe& de);
63 
64  void setAutoSave(bool b);
65  bool autoSave() const;
66 
67  virtual void getRecord(DtVrfSpotReportsSettingsRecord& rec) const;
68 
70  virtual void setFromRecord(const DtVrfSpotReportsSettingsRecord& rec);
71 
74  virtual void requestSpotReports();
75 
78  virtual void showPerspectiveForForce(const std::string&, bool autoSave = true);
79 
80  public:
81  //{@
84  void setDisplayReportingName(bool);
85  bool displayReportingName() const;
86 
87  void setDisplayObservedName(bool);
88  bool displayObservedName() const;
89 
90  void setDisplayLastContact(bool);
91  bool displayLastContact() const;
92 
93  void setDisplayLocation(bool);
94  bool displayLocation() const;
95 
96  void setDisplayVelocity(bool);
97  bool displayVelocity() const;
98 
99  void setDisplayContactRadius(bool);
100  bool displayContactRadius() const;
101 
102  void setDisplayContactRadiusIndicator(bool);
103  bool displayContactRadiusIndicator() const;
104 
105  void setDisplayHeading(bool);
106  bool displayHeading() const;
107 
108  void setDisplayEntityType(bool);
109  bool displayEntityType() const;
110 
111  void setDisplayHeadingIndicator(bool);
112  bool displayHeadingIndicator() const;
113 
114  void setDisplayVelocityIndicator(bool);
115  bool displayVelocityIndicator() const;
116 
117  void setApplyToEnvironmentals(bool);
118  bool applyToEnvironmentals() const;
119 
120  const std::vector<int>& certaintyLevels() const;
121  void setCertaintyLevels(const std::vector<int>&);
122  void setCertaintyLevel(int level, int time);
123 
127  virtual bool showSpotReportsForForce(int) const;
128  virtual bool showGroundTruthForForce(int) const;
129 
131  virtual void setSpotReportGatherTime(double);
132  virtual double spotReportGatherTime() const;
133 
135  virtual void addShowSpotReportFor(int);
136  virtual void removeShowSpotReportFor(int);
137  void setShowSpotReportsForForce(const std::vector<int>&);
138  const std::vector<int> spotReportsFor() const;
139 
140  virtual void addShowGroundTruthFor(int);
141  virtual void removeShowGroundTruthFor(int);
142  void setShowGroundTruthForForce(const std::vector<int>&);
143  const std::vector<int> groundTruthFor() const;
144 
146  virtual void setDisplayFlag(int, bool);
147 
150  virtual void setSpotReportsGloballyEnabled(bool enabled);
151 
155  void setSystemEnabled(bool);
156  bool systemEnabled() const;
158 
159  public:
161  virtual void loadDefaults(bool fromFactory = false);
162 
164  virtual void saveAsDefaults();
165 
166  const makVrv::DtRecordSettingsBackupInterface* settingsBackup() const
167  {
168  return mySettingsBackup;
169  }
170 
172  {
173  return mySettingsBackup;
174  }
175 
177  void exportSettings(const std::string& fileName);
178 
180  void importSettings(const std::string& fileName);
181 
182  virtual void processReceiveSpotReport(const DtVrfObjectMessage* msg);
183  virtual void processReceiveSpotReports(const DtVrfObjectMessage* msg);
184 
189  virtual std::string addOrUpdateSpotReport(const std::string& type, void*, const std::string& key = "");
190 
191  public:
194  virtual void addFogOfWarFilter(const DtVrfSelectionFilter&);
195 
198  virtual void removeFogOfWarFilter(const std::string&);
199 
201  virtual bool passesFogOfWarFilters(const makVrv::DtVrlinkSimulatedBaseState*) const;
202  virtual bool passesFogOfWarFilters(makVrv::DtUniqueID) const;
203 
205  virtual bool canShowScenarioEvent(makVrv::DtUniqueID) const;
206 
208  virtual bool blockSignals(bool);
209 
210  public:
213  virtual void addSpotReportDataHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
214 
216  virtual void removeSpotReport(makVrv::DtUniqueID);
217 
218  virtual void removeSpotReportDataHandler(const std::string& s);
219 
221  virtual void setSpotReportsSelectable(bool);
222  virtual bool spotReportsSelectable() const;
223 
226  virtual int certaintyLevelForTime(double d) const;
227 
228  public:
231  virtual void addSpotReportVisualHandler(const std::string& s, DtSpotReportVisualHandlerCreatorInterface*);
232 
233  virtual void removeSpotReportVisualHandler(const std::string& s);
234 
236  virtual unsigned long requestId() const;
237 
238  public:
240  boost::signal<void (const DtVrfSpotReportsSettingsRecord&)> signal_spotReportOptionsChanged;
241 
243  boost::signal<void (bool)> signal_spotReportsSelectableChanged;
244 
246  boost::signal<void (DtVrfSpotReportVisualizer*)> signal_spotReportCreated;
247 
248  protected:
251  virtual void constructSpotReportDictionary();
252 
256  virtual bool upgradeFromDictionary(makVrv::DtElementDefinitionTypeManager::ElementDefinitionType dictType,
257  bool force = false, const makVrv::DtUnicode& unknownName = makVrv::DtUnicode::fromAscii("Unknown"));
258 
260  virtual void mergeItemsFrom(const makVrv::DtElementDefinitionNew* source, makVrv::DtElementDefinitionNew* spotReport,
261  const std::vector<int>& supportedSets);
262 
263  virtual bool isUnusedVisualizer(const makVrv::DtVisualizerDefinition*) const;
264 
265  virtual void enableDecoration(const std::string&, bool);
266  virtual bool decorationIsEnabled(const std::string&) const;
267 
268  protected:
273 
275  unsigned long myRequestId;
276  std::map<std::string, DtVrfSelectionFilter*> myModified;
277  std::set<std::string> myRemoved;
278  };
279 }

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)