#include <event.h>

Public Member Functions | |
| EventSerializable (const char *name, void(*func)(SerializableObject *o)=NULL) throw (Exception) | |
| ~EventSerializable () | |
| void | clear (void) |
| bool | enqueueEvent (SerializableObject &o, nodeId target=everybodyId) |
| SerializableObject * | getEvent (void) throw (EmptyException) |
| bool | isEmpty (void) |
| bool | setHandler (void(*func)(SerializableObject *o)) |
| unsigned int | queueSize (void) |
Protected Member Functions | |
| bool | pushEvent (chain &s, nodeId sender) |
Definition at line 317 of file event.h.
| libglass::EventSerializable::EventSerializable | ( | const char * | name, | |
| void(*)(SerializableObject *o) | func = NULL | |||
| ) | throw (Exception) |
| libglass::EventSerializable::~EventSerializable | ( | ) |
| void libglass::EventSerializable::clear | ( | void | ) |
Clears queue.
| bool libglass::EventSerializable::enqueueEvent | ( | SerializableObject & | o, | |
| nodeId | target = everybodyId | |||
| ) |
Enqueues data.
| o | The object to enqueue. | |
| target | The target node id. |
| True | if successfully sent. | |
| False | if an error occurred. |
| SerializableObject* libglass::EventSerializable::getEvent | ( | void | ) | throw (EmptyException) |
Get first event in queue.
User is responsible for freeing the memory.
| bool libglass::EventSerializable::isEmpty | ( | void | ) |
Checks queue for emptiness.
| True | if empty. | |
| False | if not empty. |
Enqueues locally an event received by the network.
| s | The packed event. | |
| sender | The node which created the event. |
| True | if successfully queued. | |
| False | if an error occurred. |
Implements libglass::_Event.
| unsigned int libglass::EventSerializable::queueSize | ( | void | ) |
Returns the number of entries in queue.
| bool libglass::EventSerializable::setHandler | ( | void(*)(SerializableObject *o) | func | ) |
Sets a handler.
If the queue is not empty, the handler is called for every event in queue.
The handler is responsible for freeing the object.
| True | if successfull. | |
| False | otherwise. |
1.5.8