RSB
0.19.0
|
A rsb::Handler for rsb::Listener s that pushes all received data on a rsc::SynchronizedQueue. More...
#include <QueuePushHandler.h>
Public Member Functions | |
STATIC_ASSERT_WARN_TEMPLATE (QUEUE_PUSH_HANDLER_EVENT_WARNING,(boost::is_same< DisableEventWarning, Event >::value||!boost::is_same< T, Event >::value),"You probably do not want to use QueuePushHandler with type Event. \ If you want to receive complete Event instances inside a queue, you need to use EventQueuePushHandler. \ If you really want to use this class and want to get rid of this warning, define the second template parameter of this class to Event, too.") | |
QueuePushHandler (boost::shared_ptr< rsc::threading::SynchronizedQueue< boost::shared_ptr< T > > > queue, const std::string &method="") | |
Constructs a new instance. More... | |
std::string | getClassName () const |
void | printContents (std::ostream &stream) const |
void | handle (EventPtr event) |
Handle event. More... | |
Public Member Functions inherited from rsb::Handler | |
std::set< std::string > | getMethods () const |
Returns the desired set of methods this handler can handle. More... | |
bool | acceptsMethod (const std::string &method) const |
Private Attributes | |
boost::shared_ptr< rsc::threading::SynchronizedQueue< boost::shared_ptr< T > > > | 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. More... | |
Handler (const std::set< std::string > &methods) | |
Creates a new handler that only accepts events with the specified methods. More... | |
virtual | ~Handler () |
std::string | getClassName () const |
A rsb::Handler for rsb::Listener s that pushes all received data on a rsc::SynchronizedQueue.
This queue must handle shared pointers of the data type.
T | data type received by the handler. All data is handeled as a shared pointer of this type |
Definition at line 50 of file QueuePushHandler.h.
|
inline |
Constructs a new instance.
queue | the queue to push received data on |
method | method of this handler to react on, empty means all events |
Definition at line 69 of file QueuePushHandler.h.
|
inline |
Definition at line 76 of file QueuePushHandler.h.
|
inlinevirtual |
Handle event.
event | The event that should be handled. |
Implements rsb::eventprocessing::Handler.
Definition at line 84 of file QueuePushHandler.h.
References rsb::util::QueuePushHandler< T, DisableEventWarning >::queue.
|
inline |
Definition at line 80 of file QueuePushHandler.h.
References rsb::util::QueuePushHandler< T, DisableEventWarning >::queue.
rsb::util::QueuePushHandler< T, DisableEventWarning >::STATIC_ASSERT_WARN_TEMPLATE | ( | QUEUE_PUSH_HANDLER_EVENT_WARNING | , |
(boost::is_same< DisableEventWarning, Event >::value||!boost::is_same< T, Event >::value) | , | ||
"You probably do not want to use QueuePushHandler< T, DisableEventWarning > with type Event. \If you want to receive complete Event instances inside a | queue, | ||
you need to use EventQueuePushHandler< T, DisableEventWarning >.\If you really want to use this class and want to get rid of this | warning, | ||
define the second template parameter of this class to | Event, | ||
too." | |||
) |
|
private |
Definition at line 53 of file QueuePushHandler.h.
Referenced by rsb::util::QueuePushHandler< T, DisableEventWarning >::handle(), and rsb::util::QueuePushHandler< T, DisableEventWarning >::printContents().