RSB  0.7.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
rsb::EventQueuePushHandler Class Reference

A rsb::Handler for rsb::Listener s that pushes all received events on a rsc::SynchronizedQueue. More...

#include <EventQueuePushHandler.h>

Inheritance diagram for rsb::EventQueuePushHandler:
Inheritance graph
Collaboration diagram for rsb::EventQueuePushHandler:
Collaboration graph

Public Member Functions

 EventQueuePushHandler (boost::shared_ptr< rsc::threading::SynchronizedQueue< EventPtr > > queue, const std::string &method="")
 Constructs a new instance.
std::string getClassName () const
void printContents (std::ostream &stream) const
void handle (EventPtr event)
 Handle event.
- Public Member Functions inherited from rsb::Handler
std::set< std::string > getMethods () const
 Returns the desired set of methods this handler can handle.
bool acceptsMethod (const std::string &method) const

Private Attributes

boost::shared_ptr
< rsc::threading::SynchronizedQueue
< EventPtr > > 
queue

Additional Inherited Members

- Protected Member Functions inherited from rsb::Handler
 Handler (const std::string &method="")
 Creates a new handler that only accepts events for the specified method.
 Handler (const std::set< std::string > &methods)
 Creates a new handler that only accepts events with the specified methods.
virtual ~Handler ()

Detailed Description

A rsb::Handler for rsb::Listener s that pushes all received events on a rsc::SynchronizedQueue.

Author
jwienke

Definition at line 44 of file EventQueuePushHandler.h.

Constructor & Destructor Documentation

rsb::EventQueuePushHandler::EventQueuePushHandler ( boost::shared_ptr< rsc::threading::SynchronizedQueue< EventPtr > >  queue,
const std::string &  method = "" 
)

Constructs a new instance.

Parameters
queuethe queue to push received data on
methodmethod of this handler to react on, empty means all events

Definition at line 33 of file EventQueuePushHandler.cpp.

Member Function Documentation

string rsb::EventQueuePushHandler::getClassName ( ) const

Reimplemented from rsb::Handler.

Definition at line 39 of file EventQueuePushHandler.cpp.

void rsb::EventQueuePushHandler::handle ( EventPtr  event)
virtual

Handle event.

Parameters
eventThe event that should be handled.

Implements rsb::eventprocessing::Handler.

Definition at line 47 of file EventQueuePushHandler.cpp.

References queue.

void rsb::EventQueuePushHandler::printContents ( std::ostream &  stream) const

Definition at line 43 of file EventQueuePushHandler.cpp.

References queue.

Member Data Documentation

boost::shared_ptr<rsc::threading::SynchronizedQueue<EventPtr> > rsb::EventQueuePushHandler::queue
private

Definition at line 64 of file EventQueuePushHandler.h.

Referenced by handle(), and printContents().


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