Public Member Functions | List of all members
openmsx::MSXEventDistributor Class Reference

#include <MSXEventDistributor.hh>

Public Member Functions

 MSXEventDistributor ()=default
 MSXEventDistributor (const MSXEventDistributor &)=delete
 MSXEventDistributor (MSXEventDistributor &&)=delete
MSXEventDistributoroperator= (const MSXEventDistributor &)=delete
MSXEventDistributoroperator= (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.

Detailed Description

Definition at line 12 of file MSXEventDistributor.hh.

Constructor & Destructor Documentation

◆ MSXEventDistributor() [1/3]

openmsx::MSXEventDistributor::MSXEventDistributor ( )

◆ MSXEventDistributor() [2/3]

openmsx::MSXEventDistributor::MSXEventDistributor ( const MSXEventDistributor )

◆ MSXEventDistributor() [3/3]

openmsx::MSXEventDistributor::MSXEventDistributor ( MSXEventDistributor &&  )

◆ ~MSXEventDistributor()

openmsx::MSXEventDistributor::~MSXEventDistributor ( )

Definition at line 8 of file

Member Function Documentation

◆ distributeEvent()

void openmsx::MSXEventDistributor::distributeEvent ( const Event event,
EmuTime::param  time 

Deliver the event to all registered listeners.

eventThe event
timeCurrent 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

Referenced by openmsx::EventDelay::flush().

◆ operator=() [1/2]

MSXEventDistributor & openmsx::MSXEventDistributor::operator= ( const MSXEventDistributor )

◆ operator=() [2/2]

MSXEventDistributor & openmsx::MSXEventDistributor::operator= ( MSXEventDistributor &&  )

◆ registerEventListener()

void openmsx::MSXEventDistributor::registerEventListener ( MSXEventListener listener)

Registers a given object to receive certain events.

listenerListener that will be notified when an event arrives.

Definition at line 18 of file

Referenced by openmsx::Keyboard::Keyboard(), openmsx::MSXCommandController::MSXCommandController(), openmsx::SG1000Pause::SG1000Pause(), and openmsx::VideoLayer::VideoLayer().

◆ unregisterEventListener()

void openmsx::MSXEventDistributor::unregisterEventListener ( MSXEventListener listener)

Unregisters a previously registered event listener.

listenerListener to unregister.

Definition at line 24 of file

References move_pop_back(), and rfind_unguarded().

Referenced by openmsx::Keyboard::~Keyboard(), openmsx::MSXCommandController::~MSXCommandController(), openmsx::SG1000Pause::~SG1000Pause(), and openmsx::VideoLayer::~VideoLayer().

The documentation for this class was generated from the following files: