libglass::EventSerializable Class Reference

#include <event.h>

Inheritance diagram for libglass::EventSerializable:

libglass::_Event libglass::PluginInterface

List of all members.

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)
SerializableObjectgetEvent (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)


Detailed Description

Definition at line 317 of file event.h.


Constructor & Destructor Documentation

libglass::EventSerializable::EventSerializable ( const char *  name,
void(*)(SerializableObject *o)  func = NULL 
) throw (Exception)

libglass::EventSerializable::~EventSerializable (  ) 


Member Function Documentation

void libglass::EventSerializable::clear ( void   ) 

Clears queue.

bool libglass::EventSerializable::enqueueEvent ( SerializableObject o,
nodeId  target = everybodyId 
)

Enqueues data.

Parameters:
o The object to enqueue.
target The target node id.
Return values:
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.

Returns:
First event in queue.

bool libglass::EventSerializable::isEmpty ( void   ) 

Checks queue for emptiness.

Return values:
True if empty.
False if not empty.

bool libglass::EventSerializable::pushEvent ( chain s,
nodeId  sender 
) [protected, virtual]

Enqueues locally an event received by the network.

Parameters:
s The packed event.
sender The node which created the event.
Return values:
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.

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.

Return values:
True if successfull.
False otherwise.


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

Generated on Fri May 28 13:19:01 2010 for libGlass by  doxygen 1.5.8