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

#include <MSXEventDistributor.hh>

Public Types

using EventPtr = std::shared_ptr< const Event >
 

Public Member Functions

 MSXEventDistributor (const MSXEventDistributor &)=delete
 
MSXEventDistributoroperator= (const MSXEventDistributor &)=delete
 
 MSXEventDistributor ()=default
 
 ~MSXEventDistributor ()
 
void registerEventListener (MSXEventListener &listener)
 Registers a given object to receive certain events. More...
 
void unregisterEventListener (MSXEventListener &listener)
 Unregisters a previously registered event listener. More...
 
void distributeEvent (const EventPtr &event, EmuTime::param time)
 Deliver the event to all registered listeners. More...
 

Detailed Description

Definition at line 13 of file MSXEventDistributor.hh.

Member Typedef Documentation

◆ EventPtr

using openmsx::MSXEventDistributor::EventPtr = std::shared_ptr<const Event>

Definition at line 16 of file MSXEventDistributor.hh.

Constructor & Destructor Documentation

◆ MSXEventDistributor() [1/2]

openmsx::MSXEventDistributor::MSXEventDistributor ( const MSXEventDistributor )
delete

◆ MSXEventDistributor() [2/2]

openmsx::MSXEventDistributor::MSXEventDistributor ( )
default

◆ ~MSXEventDistributor()

openmsx::MSXEventDistributor::~MSXEventDistributor ( )

Definition at line 9 of file MSXEventDistributor.cc.

References contains().

Member Function Documentation

◆ distributeEvent()

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

Deliver the event to all registered listeners.

Parameters
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 30 of file MSXEventDistributor.cc.

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

◆ operator=()

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

◆ registerEventListener()

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

◆ unregisterEventListener()

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

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