openMSX
|
#include <MSXEventDistributor.hh>
Public Member Functions | |
MSXEventDistributor ()=default | |
MSXEventDistributor (const MSXEventDistributor &)=delete | |
MSXEventDistributor (MSXEventDistributor &&)=delete | |
MSXEventDistributor & | operator= (const MSXEventDistributor &)=delete |
MSXEventDistributor & | operator= (MSXEventDistributor &&)=delete |
~MSXEventDistributor () | |
void | registerEventListener (MSXEventListener &listener) |
Registers a given object to receive certain events. | |
void | unregisterEventListener (MSXEventListener &listener) |
Unregisters a previously registered event listener. | |
void | distributeEvent (const Event &event, EmuTime::param time) |
Deliver the event to all registered listeners. | |
Definition at line 12 of file MSXEventDistributor.hh.
|
default |
|
delete |
|
delete |
openmsx::MSXEventDistributor::~MSXEventDistributor | ( | ) |
Definition at line 8 of file MSXEventDistributor.cc.
void openmsx::MSXEventDistributor::distributeEvent | ( | const Event & | event, |
EmuTime::param | time | ||
) |
Deliver the event to all registered listeners.
event | The event |
time | Current time Note: MSXEventListener's are allowed to throw exceptions, and this method doesn't catch them (in case of an exception it's undefined which listeners receive the event) |
Definition at line 29 of file MSXEventDistributor.cc.
Referenced by openmsx::EventDelay::flush().
|
delete |
|
delete |
void openmsx::MSXEventDistributor::registerEventListener | ( | MSXEventListener & | listener | ) |
Registers a given object to receive certain events.
listener | Listener that will be notified when an event arrives. |
Definition at line 18 of file MSXEventDistributor.cc.
Referenced by openmsx::Keyboard::Keyboard(), openmsx::MSXCommandController::MSXCommandController(), openmsx::SG1000Pause::SG1000Pause(), and openmsx::VideoLayer::VideoLayer().
void openmsx::MSXEventDistributor::unregisterEventListener | ( | MSXEventListener & | listener | ) |
Unregisters a previously registered event listener.
listener | Listener to unregister. |
Definition at line 24 of file MSXEventDistributor.cc.
References move_pop_back(), and rfind_unguarded().
Referenced by openmsx::Keyboard::~Keyboard(), openmsx::MSXCommandController::~MSXCommandController(), openmsx::SG1000Pause::~SG1000Pause(), and openmsx::VideoLayer::~VideoLayer().