Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

NoOpEventTranslator Class Reference

For completeness, if you want to have events be piped directly to the local erouter instead having to be encoded and decoded. More...

#include <EventTranslator.h>

Inheritance diagram for NoOpEventTranslator:

Detailed Description

For completeness, if you want to have events be piped directly to the local erouter instead having to be encoded and decoded.

Unfortunately, this still entails a memory copy of the event since we have to make a new event for posting to the event router. We could avoid this if events were reference counted or if there was a way to direct the EventRouter not to free the event after processing.

Beware of subscribing this class as a listener to the same EventRouter that it is sending to -- could cause infinite recursion

Definition at line 82 of file EventTranslator.h.

List of all members.

Public Member Functions

 NoOpEventTranslator (EventRouter &er)
 constructor
virtual void encodeEvent (const EventBase &event, bool onlyReady=false)
 Call this with events which should be forwarded to other processes.

Protected Member Functions

virtual char * bufferRequest (unsigned int)
 should never be called, only included to satisfy interface
virtual void post (const char *, unsigned int, bool)
 should never be called, only included to satisfy interface

Protected Attributes

EventRouterevtRouter
 the EventRouter to send events to

Constructor & Destructor Documentation

NoOpEventTranslator::NoOpEventTranslator ( EventRouter er  )  [explicit]

constructor

Definition at line 85 of file EventTranslator.h.


Member Function Documentation

virtual char* NoOpEventTranslator::bufferRequest ( unsigned int   )  [protected, virtual]

should never be called, only included to satisfy interface

Implements EventTranslator.

Definition at line 91 of file EventTranslator.h.

void NoOpEventTranslator::encodeEvent ( const EventBase event,
bool  onlyReady = false 
) [virtual]

Call this with events which should be forwarded to other processes.

Parameters:
event the event to serialize and send
onlyReady if true, only send the event to observers which do not have any message backlog (if supported by transfer mechanism)

Reimplemented from EventTranslator.

Definition at line 62 of file EventTranslator.cc.

virtual void NoOpEventTranslator::post ( const char *  ,
unsigned int  ,
bool   
) [protected, virtual]

should never be called, only included to satisfy interface

Implements EventTranslator.

Definition at line 93 of file EventTranslator.h.


Member Data Documentation

the EventRouter to send events to

Definition at line 95 of file EventTranslator.h.

Referenced by encodeEvent().


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

Tekkotsu v5.1CVS
Generated Mon May 9 04:59:13 2016 by Doxygen 1.6.3