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

Convenience wrapper around the Alarm class. More...

#include <AlarmEvent.hh>

Inheritance diagram for openmsx::AlarmEvent:
Inheritance graph
[legend]
Collaboration diagram for openmsx::AlarmEvent:
Collaboration graph
[legend]

Public Member Functions

 AlarmEvent (EventDistributor &distributor, EventListener &listener, EventType type, EventDistributor::Priority priority=EventDistributor::OTHER)
 
 ~AlarmEvent ()
 
- Public Member Functions inherited from openmsx::Alarm
void schedule (unsigned period)
 Arrange for the alarm() method to be called after some time. More...
 
void cancel ()
 Cancel a previous schedule() request. More...
 
bool pending () const
 Is there a pending alarm? More...
 

Additional Inherited Members

- Protected Member Functions inherited from openmsx::Alarm
 Alarm ()
 
virtual ~Alarm ()
 
void prepareDelete ()
 Concrete subclasses MUST call this method in their destructor. More...
 

Detailed Description

Convenience wrapper around the Alarm class.

An expired alarm callback runs in the timer thread. Very often you instead want a callback in the main thread. This class takes care of that, it will make sure the signalEvent() method of the given EventListener gets called, in the main thread, when the alarm expires.

Definition at line 18 of file AlarmEvent.hh.

Constructor & Destructor Documentation

openmsx::AlarmEvent::AlarmEvent ( EventDistributor distributor,
EventListener listener,
EventType  type,
EventDistributor::Priority  priority = EventDistributor::OTHER 
)

Definition at line 5 of file AlarmEvent.cc.

References openmsx::EventDistributor::registerEventListener().

openmsx::AlarmEvent::~AlarmEvent ( )

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