openMSX
MSXEventDistributor.hh
Go to the documentation of this file.
1 #ifndef MSXEVENTDISTRIBUTOR_HH
2 #define MSXEVENTDISTRIBUTOR_HH
3 
4 #include "EmuTime.hh"
5 #include "noncopyable.hh"
6 #include <memory>
7 #include <vector>
8 
9 namespace openmsx {
10 
11 class MSXEventListener;
12 class Event;
13 
15 {
16 public:
17  typedef std::shared_ptr<const Event> EventPtr;
18 
21 
27 
33 
41  void distributeEvent(const EventPtr& event, EmuTime::param time);
42 
43 private:
44  bool isRegistered(MSXEventListener* listener) const;
45 
46  std::vector<MSXEventListener*> listeners;
47 };
48 
49 } // namespace openmsx
50 
51 #endif