31 #include <boost/shared_ptr.hpp>
32 #include <boost/function.hpp>
34 #include <rsc/runtime/TypeStringTools.h>
42 #include "rsb/rsbexports.h"
62 std::set<std::string> getMethods()
const;
63 bool acceptsMethod(
const std::string& method)
const;
73 explicit Handler(
const std::string& method =
"");
81 explicit Handler(
const std::set<std::string>& methods);
86 return rsc::runtime::typeName(
typeid(*
this));
104 const std::string& method =
"");
106 std::string getClassName()
const;
107 void printContents(std::ostream& stream)
const;
130 return "DataFunctionHandler";
134 stream <<
"DataType = " << rsc::runtime::typeName<T>()
135 <<
", function = " <<
function;
143 this->
function(boost::static_pointer_cast<T>(
event->getData()));
156 template<
class DataType>
163 notify(boost::static_pointer_cast<DataType>(event->getData()));
166 virtual void notify(boost::shared_ptr<DataType> data) = 0;
180 : filter(filter), next(next) {
184 if (this->filter->match(event)) {
185 this->next->handle(event);