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

CSimpleEventQueueBuffer Class Reference

In-memory event queue buffer. More...

#include <CSimpleEventQueueBuffer.h>

Inherits IEventQueueBuffer.

Inheritance diagram for CSimpleEventQueueBuffer:

Inheritance graph
[legend]
Collaboration diagram for CSimpleEventQueueBuffer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

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

Detailed Description

In-memory event queue buffer.

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

Definition at line 26 of file CSimpleEventQueueBuffer.h.


Member Function Documentation

bool CSimpleEventQueueBuffer::addEvent UInt32  dataID  )  [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.

Implements IEventQueueBuffer.

Definition at line 69 of file CSimpleEventQueueBuffer.cpp.

void CSimpleEventQueueBuffer::deleteTimer CEventQueueTimer *   )  const [virtual]
 

Destroy a timer object.

Destroy a timer object previously returned by newTimer().

Implements IEventQueueBuffer.

Definition at line 94 of file CSimpleEventQueueBuffer.cpp.

IEventQueueBuffer::Type CSimpleEventQueueBuffer::getEvent CEvent event,
UInt32 &  dataID
[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().

Implements IEventQueueBuffer.

Definition at line 56 of file CSimpleEventQueueBuffer.cpp.

bool CSimpleEventQueueBuffer::isEmpty  )  const [virtual]
 

Check if event queue buffer is empty.

Return true iff the event queue buffer is empty.

Implements IEventQueueBuffer.

Definition at line 81 of file CSimpleEventQueueBuffer.cpp.

CEventQueueTimer * CSimpleEventQueueBuffer::newTimer double  duration,
bool  oneShot
const [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).

Implements IEventQueueBuffer.

Definition at line 88 of file CSimpleEventQueueBuffer.cpp.

void CSimpleEventQueueBuffer::waitForEvent double  timeout  )  [virtual]
 

Block waiting for an event.

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

Implements IEventQueueBuffer.

Definition at line 39 of file CSimpleEventQueueBuffer.cpp.

References CStopwatch::getTime().


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