VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
spotReportPerspectiveInterface.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
14 
15 #include <vrfutil/vrfSingleton.h>
16 
17 class DtSpotReport;
18 
20 {
21 public:
24 
25  virtual std::string className() const = 0;
26 
28  virtual void flushData();
29 
31  virtual void idleTick();
32 
35  virtual void refresh();
36 
37  virtual void removeHandler(DtSpotReportDataHandler*);
38 
39  virtual void objectEntryRemoved(const DtUUID&);
40 
42  virtual bool isSpotReport(const DtUUID&) const;
43 
45  virtual bool removeSpotReport(const DtUUID&);
46 
48  virtual void clear();
50  virtual void processSpotReport(const DtSpotReport*);
51 
53  virtual DtSpotReportDataHandler* handlerFor(const DtUUID&) const;
54 
55  using SpotReportDataHandlersByContact = std::map<DtUUID, DtSpotReportDataHandler*>;
57  {
58  return mySpotReportDataHandlersByContact;
59  }
60 
62  virtual bool forceFlush() const;
63 
64 public:
66  boost::signals2::signal<void (std::set<DtSpotReportDataHandler*>)> signal_reportsUpdated;
67  boost::signals2::signal<void (DtSpotReportDataHandler*)> signal_handlerAboutToBeRemoved;
68 
69 protected:
70 
72  virtual bool accept(const DtSpotReport*) const = 0;
73 
74  virtual DtSpotReportDataHandler* addOrUpdateDataHandler(const DtSpotReport*);
75 
76  virtual DtSpotReportDataHandler* createSpotReportDataHandler(const DtSpotReport*) const;
77  virtual void handlerRemoved(DtSpotReportDataHandler*);
78 
79 protected:
81 
85 
86  using SpotReportDataHandlers = std::map<DtUUID, std::unique_ptr<DtSpotReportDataHandler>>;
88 
89  std::set<DtSpotReportDataHandler*> myFlushReports;
90  bool myForceFlush = false;
91 };
92 
94 {
95 public:
96  virtual std::string className() const = 0;
97  virtual DtSpotReportPerspectiveInterface* create(DtSpotReportManager& manager) const = 0;
98 };
99 
100 #define REGISTER_PERSPECTIVE_OVERRIDE(Class_Name, Parent_Class_Name) \
101 public: \
102  class Class_Name##Creator : public Parent_Class_Name##Creator \
103  { \
104  public: \
105  virtual DtSpotReportPerspectiveInterface* create(DtSpotReportManager& manager) const { return new Class_Name(manager); }; \
106  }; \
107  static void Register(DtSpotReportManager& mgr) { mgr.registerPerspectiveCreator(new Class_Name::Class_Name##Creator); }; \
108 
109 #define REGISTER_PERSPECTIVE(Class_Name) \
110 public: \
111  class Class_Name##Creator : public DtSpotReportPerspectiveCreatorInterface \
112  { \
113  public: \
114  static std::string ClassName() { return #Class_Name; } \
115  virtual std::string className() const override { return Class_Name::Class_Name##Creator::ClassName(); }; \
116  virtual DtSpotReportPerspectiveInterface* create(DtSpotReportManager& manager) const { return new Class_Name(manager); }; \
117  }; \
118  static void Register(DtSpotReportManager& mgr) { mgr.registerPerspectiveCreator(new Class_Name::Class_Name##Creator); }; \
119  virtual std::string className() const override { return Class_Name##Creator::ClassName(); }; \
120  static std::string ClassName() { return Class_Name##Creator::ClassName(); };
UUID is a unique ID wrapper class.
Definition: uuid.h:59
The DtSpotReportManager class is used manage and keep track of spot reports. by spotter and who they ...
Definition: spotReportManager.h:34
#define DT_DLL_vrfcontrol
This file is used to determine how to build.
Definition: vrfcontrolDefines.h:28
boost::signals2::signal< void(DtSpotReportDataHandler *)> signal_handlerAboutToBeRemoved
Definition: spotReportPerspectiveInterface.h:67
SpotReportDataHandlers mySpotReportDataHandlers
Definition: spotReportPerspectiveInterface.h:87
std::map< DtUUID, std::unique_ptr< DtSpotReportDataHandler >> SpotReportDataHandlers
Definition: spotReportPerspectiveInterface.h:86
const SpotReportDataHandlersByContact & spotReportHandlersByContact() const
Definition: spotReportPerspectiveInterface.h:56
Contains makVrv::DtSpotReportDataHandler class. This class, and it&#39;s subclasses, will be responsible ...
DtVrfSingleton is a class that all singletons that can be registered with the DtVrfSingletonRoot are ...
Definition: vrfSingleton.h:15
std::set< DtSpotReportDataHandler * > myFlushReports
Definition: spotReportPerspectiveInterface.h:89
std::map< DtUUID, DtSpotReportDataHandler * > SpotReportDataHandlersByContact
Definition: spotReportPerspectiveInterface.h:55
Definition: spotReportPerspectiveInterface.h:19
virtual std::string className() const =0
SpotReportDataHandlersByContact mySpotReportDataHandlersByContact
Handlers must always be organized by contact. The question is just which contact will be kept and whi...
Definition: spotReportPerspectiveInterface.h:84
DtSpotReportManager & myManager
Definition: spotReportPerspectiveInterface.h:80
Definition: spotReportPerspectiveInterface.h:93
DtSpotReport; subclass of DtSimReport.
Definition: spotReport.h:35
Definition: spotReportDataHandler.h:30

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)