OpenCPN Partial API docs
json_event.h
1 #ifndef _JSON_EVT_H__
2 #define _JSON_EVT_H__
3 
4 #include <memory>
5 #include <string>
6 
7 #include <wx/event.h>
8 
9 #include "observable_evtvar.h"
10 
12 class JsonEvent {
13 public:
14 static JsonEvent& getInstance() {
15  static JsonEvent instance;
16  return instance;
17 }
18 
19 void Notify(const std::string& message, std::shared_ptr<void> msg_root) {
20  event.Notify(msg_root, message, 0);
21 }
22 
23 private:
24 EventVar event;
25 };
26 
27 #endif
Generic event handling between MVC Model and Controller based on a shared EventVar variable.
Handle sending of wxJson messages to all plugins.
Definition: json_event.h:12