RSB
0.7.0
|
A utility class to simplify data handling by automatically passing the data of the desired type to a function. More...
#include <Handler.h>
Public Types | |
typedef boost::shared_ptr< T > | DataPtr |
typedef boost::function< void(DataPtr)> | DataFunction |
Public Member Functions | |
std::string | getClassName () const |
void | printContents (std::ostream &stream) const |
DataFunctionHandler (const DataFunction &function) | |
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 | |
DataFunction | 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 () |
A utility class to simplify data handling by automatically passing the data of the desired type to a function.
This class is primarily intended for use with Boost.Bind.
T | desired data type to retrieve from the listeners |
typedef boost::function<void(DataPtr)> rsb::DataFunctionHandler< T >::DataFunction |
typedef boost::shared_ptr<T> rsb::DataFunctionHandler< T >::DataPtr |
|
inline |
|
inline |
Reimplemented from rsb::Handler.
|
inlinevirtual |
Handle event.
event | The event that should be handled. |
Implements rsb::eventprocessing::Handler.
|
inline |
|
protected |