| 284 | */ |
| 285 | template <typename T> |
| 286 | void route( |
| 287 | const std::string& name, |
| 288 | const Option<std::string>& help, |
| 289 | Future<http::Response> (T::*method)(const http::Request&), |
| 290 | const RouteOptions& options = RouteOptions()) |
| 291 | { |
| 292 | // Note that we use dynamic_cast here so a process can use |
| 293 | // multiple inheritance if it sees so fit (e.g., to implement |
| 294 | // multiple callback interfaces). |
| 295 | HttpRequestHandler handler = |
| 296 | lambda::bind(method, dynamic_cast<T*>(this), lambda::_1); |
| 297 | route(name, help, handler, options); |
| 298 | } |
| 299 | |
| 300 | /** |
| 301 | * Any function which takes a `process::http::Request` and an |
nothing calls this directly
no test coverage detected