Argentum Online - Servidor
th_observer.h
1 #ifndef TH_OBSERVER_H
2 #define TH_OBSERVER_H
3 
4 #include <atomic>
5 
6 #include "../include/blocking_th_event_handler.h"
7 #include "../include/thread.h"
8 #include "../include/types.h"
9 #include "game/map_monitor.h"
10 
11 class ThObserver : public Thread {
12  private:
13  std::atomic_bool running;
14  MapMonitor& map;
15  BlockingThEventHandler& handler;
16  std::atomic_bool forced_update;
17 
18  void send_update_logs();
19 
20  public:
21  ThObserver(MapMonitor& map_monitor, BlockingThEventHandler& handler);
22 
23  void run() override;
24 
25  void stop();
26 
27  ~ThObserver();
28 };
29 
30 #endif // TH_OBSERVER_H
ThObserver::run
void run() override
Function to be called by the thread.
Definition: th_observer.cpp:110
ThObserver
Definition: th_observer.h:11
MapMonitor
Definition: map_monitor.h:14
BlockingThEventHandler
Definition: blocking_th_event_handler.h:22
Thread
Definition: thread.h:9