EventTranslator Class Reference#include <EventTranslator.h>
Inheritance diagram for EventTranslator:
[legend]List of all members.
Detailed Description
EventTranslator receives events from EventRouters in non-Main processes and adds them into a SharedQueue for Main to pick up.
Definition at line 11 of file EventTranslator.h.
Member Typedef Documentation
Constructor & Destructor Documentation
EventTranslator::EventTranslator |
( |
|
) |
[inline] |
|
EventTranslator::~EventTranslator |
( |
|
) |
[virtual] |
|
Member Function Documentation
virtual char* EventTranslator::bufferRequest |
( |
unsigned int |
size |
) |
[protected, pure virtual] |
|
EventBase * EventTranslator::decodeEvent |
( |
const char * |
buf, |
|
|
unsigned int |
size |
|
) |
[static] |
|
|
Called with buffers containing incoming events which should be reconstituted.
- Returns:
- the reconstituted event, or NULL if an error occured (malformed data)
Definition at line 49 of file EventTranslator.cc. |
void EventTranslator::encodeEvent |
( |
const EventBase & |
event |
) |
[virtual] |
|
virtual void EventTranslator::post |
( |
const char * |
buf, |
|
|
unsigned int |
size |
|
) |
[protected, pure virtual] |
|
|
Called by encodeEvent() after serialization is complete for communication to other processes.
- Parameters:
-
| buf | the data to be sent, will be a buffer previously requested from bufferRequest |
| size | the number of bytes to send |
You will always get this callback after each call to bufferRequest(), even in the event of an error during saving. If an error occured, the callback will receive 0 for size.
Implemented in NoOpEventTranslator, and IPCEventTranslator.
Referenced by encodeEvent(). |
virtual void EventTranslator::processEvent |
( |
const EventBase & |
event |
) |
[inline, virtual] |
|
|
Call this with events which should be forwarded to other processes (redirects to encodeEvent()).
By providing an EventListener interface, you can directly register this class with an EventRouter instead of having to manually forward events (although you could do that as well)
Implements EventListener.
Definition at line 33 of file EventTranslator.h. |
template<class EB> |
static bool EventTranslator::registerPrototype |
( |
|
) |
[inline, static] |
|
virtual void EventTranslator::setTrapEventValue |
( |
bool |
v |
) |
[inline, virtual] |
|
|
set trapRet, which can let you decide whether trapped events should be filtered or not
Definition at line 52 of file EventTranslator.h. |
virtual bool EventTranslator::trapEvent |
( |
const EventBase & |
event |
) |
[inline, virtual] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|