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

A utility class to simplify event handling in ordinary functions or member functions. More...

#include <Handler.h>

Inheritance diagram for rsb::EventFunctionHandler:
Inheritance graph
Collaboration diagram for rsb::EventFunctionHandler:
Collaboration graph

Public Member Functions

 EventFunctionHandler (const EventFunction &function, const std::string &method="")
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

Protected Attributes

EventFunction function

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 utility class to simplify event handling in ordinary functions or member functions.

This class is primarily intended for use with Boost.Bind.

Definition at line 101 of file Handler.h.

Constructor & Destructor Documentation

rsb::EventFunctionHandler::EventFunctionHandler ( const EventFunction function,
const std::string &  method = "" 
)

Definition at line 57 of file Handler.cpp.

Member Function Documentation

string rsb::EventFunctionHandler::getClassName ( ) const

Reimplemented from rsb::Handler.

Definition at line 62 of file Handler.cpp.

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

Handle event.

Parameters
eventThe event that should be handled.

Implements rsb::eventprocessing::Handler.

Definition at line 70 of file Handler.cpp.

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

Definition at line 66 of file Handler.cpp.

Member Data Documentation

EventFunction rsb::EventFunctionHandler::function
protected

Definition at line 111 of file Handler.h.


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