Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

IEventQueueBuffer Class Reference

Event queue buffer interface. More...

#include <IEventQueueBuffer.h>

Inherits IInterface.

Inherited by CMSWindowsEventQueueBuffer, COSXEventQueueBuffer, CSimpleEventQueueBuffer, and CXWindowsEventQueueBuffer.

Inheritance diagram for IEventQueueBuffer:

Inheritance graph
[legend]
Collaboration diagram for IEventQueueBuffer:

Collaboration graph
[legend]
List of all members.

Public Types

enum  Type { kNone, kSystem, kUser }

Public Member Functions

manipulators
virtual void waitForEvent (double timeout)=0
 Block waiting for an event.
virtual Type getEvent (CEvent &event, UInt32 &dataID)=0
 Get the next event.
virtual bool addEvent (UInt32 dataID)=0
 Post an event.
accessors
virtual bool isEmpty () const =0
 Check if event queue buffer is empty.
virtual CEventQueueTimer * newTimer (double duration, bool oneShot) const =0
 Create a timer object.
virtual void deleteTimer (CEventQueueTimer *) const =0
 Destroy a timer object.

Detailed Description

Event queue buffer interface.

An event queue buffer provides a queue of events for an IEventQueue.

Definition at line 28 of file IEventQueueBuffer.h.


Member Enumeration Documentation

enum IEventQueueBuffer::Type
 

Enumeration values:
kNone  No event is available.
kSystem  Event is a system event.
kUser  Event is a user event.

Definition at line 30 of file IEventQueueBuffer.h.


Member Function Documentation

virtual bool IEventQueueBuffer::addEvent UInt32  dataID  )  [pure virtual]
 

Post an event.

Add the given event to the end of the queue buffer. This is a user event and getEvent() must be able to identify it as such and return dataID. This method must cause waitForEvent() to return at some future time if it's blocked waiting on an event.

Implemented in CSimpleEventQueueBuffer, CMSWindowsEventQueueBuffer, COSXEventQueueBuffer, and CXWindowsEventQueueBuffer.

Referenced by CEventQueue::addEvent().

virtual void IEventQueueBuffer::deleteTimer CEventQueueTimer *   )  const [pure virtual]
 

Destroy a timer object.

Destroy a timer object previously returned by newTimer().

Implemented in CSimpleEventQueueBuffer, CMSWindowsEventQueueBuffer, COSXEventQueueBuffer, and CXWindowsEventQueueBuffer.

Referenced by CEventQueue::deleteTimer().

virtual Type IEventQueueBuffer::getEvent CEvent event,
UInt32 &  dataID
[pure virtual]
 

Get the next event.

Get the next event from the buffer. Return kNone if no event is available. If a system event is next, return kSystem and fill in event. The event data in a system event can point to a static buffer (because CEvent::deleteData() will not attempt to delete data in a kSystem event). Otherwise, return kUser and fill in dataID with the value passed to addEvent().

Implemented in CSimpleEventQueueBuffer, CMSWindowsEventQueueBuffer, COSXEventQueueBuffer, and CXWindowsEventQueueBuffer.

Referenced by CEventQueue::getEvent().

virtual bool IEventQueueBuffer::isEmpty  )  const [pure virtual]
 

Check if event queue buffer is empty.

Return true iff the event queue buffer is empty.

Implemented in CSimpleEventQueueBuffer, CMSWindowsEventQueueBuffer, COSXEventQueueBuffer, and CXWindowsEventQueueBuffer.

Referenced by CEventQueue::getEvent(), and CEventQueue::isEmpty().

virtual CEventQueueTimer* IEventQueueBuffer::newTimer double  duration,
bool  oneShot
const [pure virtual]
 

Create a timer object.

Create and return a timer object. The object is opaque and is used only by the buffer but it must be a valid object (i.e. not NULL).

Implemented in CSimpleEventQueueBuffer, CMSWindowsEventQueueBuffer, COSXEventQueueBuffer, and CXWindowsEventQueueBuffer.

Referenced by CEventQueue::newOneShotTimer(), and CEventQueue::newTimer().

virtual void IEventQueueBuffer::waitForEvent double  timeout  )  [pure virtual]
 

Block waiting for an event.

Wait for an event in the event queue buffer for up to timeout seconds.

Implemented in CSimpleEventQueueBuffer, CMSWindowsEventQueueBuffer, COSXEventQueueBuffer, and CXWindowsEventQueueBuffer.

Referenced by CEventQueue::getEvent().


The documentation for this class was generated from the following file:
Generated on Fri Nov 6 00:21:36 2009 for synergy-plus by  doxygen 1.3.9.1