#include <EventChannel.h>
Inheritance diagram for qpid::sys::Event:
Public Types | |
typedef boost::function0< void > | Callback |
Type for callback when event is dispatched. | |
Public Member Functions | |
Event (Callback cb=0) | |
Create an event with optional callback. | |
void | dispatch () |
Call the callback provided to the constructor, if any. | |
bool | hasError () const |
True if there was an error processing this event. | |
void | throwIfError () throw (Exception) |
If hasError() throw the corresponding exception. | |
Protected Member Functions | |
virtual void | prepare (EventHandler &) |
virtual Event * | complete (EventHandler &) |
void | setError (const ExceptionHolder &e) |
Protected Attributes | |
Callback | callback |
ExceptionHolder | error |
qpid::sys::Event::Event | ( | Callback | cb = 0 |
) | [inline] |
Create an event with optional callback.
Instances of Event are sent directly through the channel. Derived classes define additional waiting behaviour.
cb | A callback functor that is invoked when dispatch() is called. |