VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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 
22 
23 #pragma once
24 
25 #include <vrfGuiCore/vrfGuiCore.h>
29 #include <vrvUtil/event_signal.h>
30 
31 #include <vrfutil/rwUUID.h>
34 
36 
37 #include "vlpi/entityType.h"
38 
39 class DtVrfObjectMessage;
40 
41 namespace makVrv
42 {
43  class DtDe;
44  class DtRecordSettingsBackupInterface;
45  class DtObjectDictionary;
46  class DtSharedSettingsManager;
47  class DtElementDefinition;
48  class DtVisualizerDefinition;
49 }
50 
51 namespace makVrf
52 {
53  class DtSpotReportDataHandlerCreatorInterface;
54  class DtExternalDataVisualHandlerCreatorInterface;
55  class DtVrfSelectionFilter;
56  class DtGuiLocalObject;
57 
59  {
60  public:
62  virtual ~DtVrfSpotReportManager() override;
63 
65  static DtVrfSpotReportManager& instance(makVrv::DtDe& de);
66 
67  void setAutoSave(bool b);
68  bool autoSave() const;
69 
71  virtual DtSimObjectReference lookup(const DtUUID&) const;
72 
73  virtual void getRecord(DtVrfSpotReportsSettingsRecord& rec) const;
74 
77  virtual void getSplitRecord(std::vector<DtVrfSpotReportsSettingsRecord>& rec,
78  std::vector<std::string>& fileNames) {};
79 
83  DtVrfSpotReportsSettingsRecord& combinedRec) {};
84 
86  virtual void setFromRecord(const DtVrfSpotReportsSettingsRecord& rec, bool updateFilter = true);
87 
90  virtual void requestSpotReports();
91 
93  virtual void requestSpotReportsFor(std::vector<int> forces);
94 
97  virtual void showPerspectiveForForce(const std::string&, bool autoSave = true);
98 
99  public:
100  //{@
103  virtual void setDisplayReportingName(bool);
104  virtual bool displayReportingName() const;
105 
106  virtual void setDisplayObservedName(bool);
107  virtual bool displayObservedName() const;
108 
109  virtual void setDisplayTimeSinceLastReport(bool);
110  virtual bool displayTimeSinceLastReport() const;
111 
112  virtual void setDisplayLastContact(bool);
113  virtual bool displayLastContact() const;
114 
115  virtual void setDisplayLocation(bool);
116  virtual bool displayLocation() const;
117 
118  virtual void setDisplayVelocity(bool);
119  virtual bool displayVelocity() const;
120 
121  virtual void setDisplayContactRadius(bool);
122  virtual bool displayContactRadius() const;
123 
124  virtual void setDisplayContactRadiusIndicator(bool);
125  virtual bool displayContactRadiusIndicator() const;
126 
127  virtual void setDisplayHeading(bool);
128  virtual bool displayHeading() const;
129 
130  virtual void setDisplayEntityType(bool);
131  virtual bool displayEntityType() const;
132 
133  virtual void setDisplayHeadingIndicator(bool);
134  virtual bool displayHeadingIndicator() const;
135 
136  virtual void setDisplayVelocityIndicator(bool);
137  virtual bool displayVelocityIndicator() const;
138 
139  virtual void setApplyToEnvironmentals(bool);
140  virtual bool applyToEnvironmentals() const;
141 
142  virtual void setShowOnlyActiveEnvironmentals(bool);
143  virtual bool showOnlyActiveEnvironmentals() const;
144 
145  virtual void setShow3DGroundTruth(bool);
146  virtual bool show3DGroundTruth() const;
147 
149  virtual void setShowTrackHistories(bool);
150  virtual bool showTrackHistories() const;
151 
153  virtual void setShowTrackHistoriesForSelected(bool);
154  virtual bool showTrackHistoriesForSelected() const;
155 
157  virtual void setNumberOfTrackReports(int);
158  virtual int numberOfTrackReports() const;
159 
160  const std::vector<int>& certaintyLevels() const;
161  void setCertaintyLevels(const std::vector<int>&);
162  void setCertaintyLevel(int level, int time);
163 
167  virtual bool showSpotReportsForForce(int) const;
168  virtual bool showGroundTruthForForce(int) const;
169 
171  virtual void setSpotReportGatherTime(double);
172  virtual double spotReportGatherTime() const;
173 
175  virtual void setKeepReportsForTimePeriod(bool);
176  virtual bool keepReportsForTimePeriod() const;
177 
179  virtual void setKeepReportsForTime(int);
180  virtual int keepReportsForTime() const;
181 
183  virtual void addShowSpotReportFor(int);
184  virtual void removeShowSpotReportFor(int);
185  void setShowSpotReportsForForce(const std::vector<int>&);
186  const std::vector<int> spotReportsFor() const;
187 
188  virtual bool isSpotReport(makVrv::DtUniqueID id) const;
189 
190  virtual void addShowGroundTruthFor(int);
191  virtual void removeShowGroundTruthFor(int);
192  void setShowGroundTruthForForce(const std::vector<int>&);
193  const std::vector<int> groundTruthFor() const;
194 
196  virtual void setDisplayFlag(int, bool);
197 
200  virtual void setSpotReportsGloballyEnabled(bool enabled);
201 
205  void setSystemEnabled(bool);
206  bool systemEnabled() const;
208 
209  public:
211  virtual void loadDefaults(bool fromFactory = false);
212 
214  virtual void saveAsDefaults();
215 
217  {
218  return mySettingsBackup;
219  }
220 
222  {
223  return mySettingsBackup;
224  }
225 
227  void exportSettings(const std::string& fileName);
228 
230  void importSettings(const std::string& fileName);
231 
232  virtual void processReceiveSpotReport(const DtVrfObjectMessage* msg);
233  virtual void processReceiveSpotReports(const DtVrfObjectMessage* msg);
234 
239  virtual bool addOrUpdateSpotReport(const std::string& type, void*, const DtUUID&);
240 
241  public:
244  virtual void addFogOfWarFilter(const DtVrfSelectionFilter&);
245 
248  virtual void removeFogOfWarFilter(const std::string&);
249 
251  virtual bool passesFogOfWarFilters(DtSimObjectReference) const;
252  virtual bool passesFogOfWarFilters(makVrv::DtUniqueID) const;
253  virtual bool passesFogOfWarFilters(const DtUUID&) const;
254 
256  virtual bool canShowScenarioEvent(makVrv::DtUniqueID) const;
257 
259  virtual bool blockSignals(bool);
260 
261  public:
264  virtual void addSpotReportDataHandler(const std::string& s, DtSpotReportDataHandlerCreatorInterface*);
265 
267  virtual void removeSpotReport(makVrv::DtUniqueID);
268 
269  virtual void removeSpotReportDataHandler(const std::string& s);
270 
272  virtual void setSpotReportsSelectable(bool);
273  virtual bool spotReportsSelectable() const;
274 
277  virtual int certaintyLevelForTime(double d) const;
278 
280  virtual void reset();
281 
282  public:
285  virtual void addSpotReportVisualHandler(const std::string& s, DtExternalDataVisualHandlerCreatorInterface*);
286 
287  virtual void removeSpotReportVisualHandler(const std::string& s);
288 
290  virtual bool passesAllFilters(DtSimObjectReference s) const;
291  virtual bool passesAllFilters(makVrv::DtUniqueID id) const;
292 
293  public:
296  boost::signals2::signal<void (DtGuiLocalObject*)> signal_spotReportCreated;
297  boost::signals2::signal<void (DtGuiLocalObject*)> signal_spotReportUpdated;
299 
300  public:
302  boost::signals2::signal<void (const DtVrfSpotReportsSettingsRecord&)> signal_spotReportOptionsChanged;
303 
305  boost::signals2::signal<void (bool)> signal_spotReportsSelectableChanged;
306 
308  boost::signals2::signal<void (bool)> signal_showTrackHistoryForSelectedItemsChanged;
309 
311  boost::signals2::signal<void (int)> signal_numberOfTrackReportsChanged;
312 
314  boost::signals2::signal<void (bool)> signal_keepReportsForTimePeriodChanged;
315 
317  boost::signals2::signal<void (int)> signal_keepReportsForTimeChanged;
318 
319  protected:
320 
321  virtual void enableDecoration(const std::string&, bool);
322  virtual bool decorationIsEnabled(const std::string&) const;
323 
324  virtual void slot_observerModeAdded(int);
325 
327  virtual void setTrackHistoriesVisible(bool);
328  virtual void slot_organizedCategoriesInitialized();
329 
330  virtual void showOnlyActiveEnvironmentalsChanged();
331 
332  protected:
337 
339  std::set<unsigned long> mySpotReportRequestIds;
340  std::set<int> myAlreadyRequested;
341  std::map<std::string, DtVrfSelectionFilter*> myModified;
342  std::set<std::string> myRemoved;
343 
344  boost::signals2::scoped_connection myShowOnlyActiveEnvironmentalsChangedConnection;
346 
348  DtEntityType myStealthType;
349  };
350 
352  {
353  public:
354 
356 
360 
364  static DtSharedSpotReportSignaler* findInstance(
366 
368  virtual ~DtSharedSpotReportSignaler() override;
369 
370  //@name Signals
372 
375 
376  protected:
378  };
379 }
UUID is a unique ID wrapper class.
Definition: uuid.h:59
class DtVrfSelectionFilter
Definition: vrfSelectionFilters.h:28
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
boost::signals2::signal< void(int)> signal_keepReportsForTimeChanged
Sent when when the time to keep reports has changed. Only sent if keeping reports for time period...
Definition: vrfSpotReportManager.h:317
boost::signals2::signal< void(bool)> signal_keepReportsForTimePeriodChanged
Sent when when the way to time out reports have changed.
Definition: vrfSpotReportManager.h:314
std::map< std::string, DtVrfSelectionFilter * > myModified
Definition: vrfSpotReportManager.h:341
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
boost::signals2::scoped_connection myShowOnlyActiveEnvironmentalsChangedConnection
Definition: vrfSpotReportManager.h:344
Definition: vrfSpotReportsSettingsRecord.h:33
Contains makVrv:DtSelectionManager class.
boost::signals2::signal< void(const DtVrfSpotReportsSettingsRecord &)> signal_spotReportOptionsChanged
Sent after anything about the spot report options have changed.
Definition: vrfSpotReportManager.h:302
Definition: vrfSpotReportManager.h:58
std::set< std::string > myRemoved
Definition: vrfSpotReportManager.h:342
virtual void getSplitRecord(std::vector< DtVrfSpotReportsSettingsRecord > &rec, std::vector< std::string > &fileNames)
To support writing element definitions in folders as multiple files not implemented.
Definition: vrfSpotReportManager.h:77
Contains the DtUUID class declaration.
The shared settings manager, is the global object responsible for managing any shared settings object...
Definition: DtSharedSettingsManager.h:42
DtEntityType myStealthType
Definition: vrfSpotReportManager.h:348
#define DT_DLL_VRFGUICORE
Contains DLL export macros.
Definition: vrfGuiCore.h:25
std::set< unsigned long > mySpotReportRequestIds
Definition: vrfSpotReportManager.h:339
makVrv::DtRecordSettingsBackupInterface * mySettingsBackup
Definition: vrfSpotReportManager.h:334
Contains makVrv::event_signal class.
The event queue interface is a cross thread event queue used to emit event_signal across thread bound...
Definition: DtEventQueueInterface.h:27
Definition: spotReportDataHandler.h:72
makVrv::DtSignalConnectionManager myConnections
Definition: vrfSpotReportManager.h:347
makVrv::event_signal< void(bool)> signal_show3DGroundTruthChanged
Definition: vrfSpotReportManager.h:373
Contains makVrv::DtVirtualBaseClass class.
std::set< int > myAlreadyRequested
Definition: vrfSpotReportManager.h:340
boost::signals2::signal< void(DtGuiLocalObject *)> signal_spotReportUpdated
Signals sent specifically for data objects that represent spot/TDL report data.
Definition: vrfSpotReportManager.h:297
bool mySignalsBlocked
Definition: vrfSpotReportManager.h:335
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
makVrv::DtRecordSettingsBackupInterface * settingsBackup()
Definition: vrfSpotReportManager.h:221
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
boost::signals2::signal< void(int)> signal_numberOfTrackReportsChanged
Sent when when the number of track reports to store have changed.
Definition: vrfSpotReportManager.h:311
Base class to provide boost signal/slot management.
boost::signals2::signal< void(bool)> signal_showTrackHistoryForSelectedItemsChanged
Sent when whether or not track history for selected items have changed.
Definition: vrfSpotReportManager.h:308
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
virtual void addRecords(DtVrfSpotReportsSettingsRecord &recs, DtVrfSpotReportsSettingsRecord &combinedRec)
To support writing element definitions in folders as multiple files not implemented.
Definition: vrfSpotReportManager.h:82
bool mySpotReportsSelectable
Definition: vrfSpotReportManager.h:338
The makVrv::DtRecordSettingsBackupInterface provides an interface to record-based backups...
Definition: DtRecordSettingsBackup.h:23
Definition: vrfSpotReportManager.h:351
makVrv::DtDe & myDe
Definition: vrfSpotReportManager.h:333
boost::signals2::signal< void(DtGuiLocalObject *)> signal_spotReportCreated
Signals sent specifically for data objects that represent spot/TDL report data.
Definition: vrfSpotReportManager.h:296
DtVrfSpotReportsSettingsRecord mySpotReportSettings
Definition: vrfSpotReportManager.h:336
Definition: externalDataVisualHandlerInterface.h:83
boost::signals2::signal< void(bool)> signal_spotReportsSelectableChanged
Sent after selectability of spot reports have changed. This is currently only able to be set via the ...
Definition: vrfSpotReportManager.h:305
DtVrfSelectionFilter * myActiveEnvironmentalsFilter
Definition: vrfSpotReportManager.h:345
const makVrv::DtRecordSettingsBackupInterface * settingsBackup() const
Definition: vrfSpotReportManager.h:216

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)