EventQueue Class Reference

#include <EventQueue.h>

List of all members.

Public Member Functions

  EventQueue ()
virtual  ~EventQueue ()
void  queueEvent (Event *)
int  size () const
void  clear ()
  Normally only called on exit to clean up any outstanding events:
Event::EventType  getLastType () const
  Return the type of the last event queued.
void  wait (double duration=0.0)
  If the queue is empty wait for an event to arrive or for the signal method to be invoked.
void  signal ()
  Wakeup any threads waiting for an event to arrive.
double  swap (EventList &queue)
  This event queue can be obtained by calling swap().
void  setClient (EventQueueClient *client)
  The setClient method can be used to attach an EventQueueClient to this queue in order to be notified of activity events.
EventQueueClient getClient () const

Constructor & Destructor Documentation

virtual ~EventQueue ( ) [virtual]

Member Function Documentation

void queueEvent ( Event )
int size ( ) const
void clear ( )

Normally only called on exit to clean up any outstanding events:

Event::EventType getLastType ( ) const

Return the type of the last event queued.

If there are no events on the queue return type NONE.

void wait ( double  duration = 0.0 )

If the queue is empty wait for an event to arrive or for the signal method to be invoked.

If the queue is not empty this method will return immediately. If duration is greater than zero we will wait no longer than duration seconds.

void signal ( )

Wakeup any threads waiting for an event to arrive.

Note that this usually implies that they will find the queue still empty upon arousal.

double swap ( EventList queue )

This event queue can be obtained by calling swap().

The return value is a time stamp which is guaranteed not to be earlier than the last event in the returned queue, and not to be later than the first event in the queue returned the next time the method is called.

Note that this method suspends the queuing of events by the window thread and "swaps out" the current queue, leaving the EventQueue with an empty list, and the caller with ownership of the events collected since the last time swap() was called.

void setClient ( EventQueueClient client )

The setClient method can be used to attach an EventQueueClient to this queue in order to be notified of activity events.

EventQueueClient* getClient ( ) const [inline]
{ return myClient; }

EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue
EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue EventQueue