OpenCPN Partial API docs
Loading...
Searching...
No Matches
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
12class JsonEvent {
13public:
14static JsonEvent& getInstance() {
15 static JsonEvent instance;
16 return instance;
17}
18
19void Notify(const std::string& message, std::shared_ptr<void> msg_root) {
20 event.Notify(msg_root, message, 0);
21}
22
23private:
24EventVar event;
25};
26
27#endif
28
Generic event handling between between two parties like MVC Model and Controller using a shared Event...
Handle sending of wxJson messages to all plugins.
Definition: json_event.h:12