eventq Class Reference

A class for sending event-data to a thread. More...

#include <eventq.h>

Collaboration diagram for eventq:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 eventq (void)
int count (void)
void send (const value &v)
void send (const statstring &tp, const value &dt)
void send (const statstring &tp)
void send (const char *tp)
valuenextevent (void)
valuewaitevent (int timeout_msec)
valuewaitevent (void)

Protected Attributes

lock< valueipc
conditional event

Detailed Description

A class for sending event-data to a thread.

It implements a fifo-queue of value objects. The receiving thread can either poll or sleep on incoming events.


Member Function Documentation

value * eventq::nextevent ( void   ) 

Get the next event, if there is any.

Will return an empty value-object if no events are waiting.

References ipc.

Referenced by thread::nextevent().

void eventq::send ( const char *  tp  )  [inline]

Send an empty event with only a type.

Will be received as a boolean 'true' and the tprovided type().

Parameters:
tp The type() of the event.

References send().

Referenced by send().

Here is the call graph for this function:

void eventq::send ( const statstring tp  ) 

Send an empty event with only a type.

Will be received as a boolean 'true' and the tprovided type().

Parameters:
tp The type() of the event.

References ipc.

void eventq::send ( const statstring tp,
const value dt 
)

Send an event with a specified type.

Parameters:
tp The type() of the event.
dt The event-data.

References ipc.

void eventq::send ( const value v  ) 

Send an event.

Will be received with a type() of "event".

Parameters:
v The event-data.

References ipc.

Referenced by thread::sendevent(), and daemon::sendevent().

value * eventq::waitevent ( int  timeout_msec  ) 

Wait for a new event with a timeout.

Will return an empty value-object if the timeout was reached.

Parameters:
timeout_msec The timeout in milliseconds.

References event, ipc, conditional::wait(), and waitevent().

Referenced by thread::waitevent(), and daemon::waitevent().

Here is the call graph for this function:


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

Generated on Sun Feb 28 10:35:35 2010 for GRACE by  doxygen 1.6.1