SNode.C
Loading...
Searching...
No Matches
Route.cpp File Reference
Include dependency graph for Route.cpp:

Go to the source code of this file.

Namespaces

namespace  express
 

Macros

#define DEFINE_ROUTE_REQUESTMETHOD(METHOD, HTTP_METHOD)
 

Macro Definition Documentation

◆ DEFINE_ROUTE_REQUESTMETHOD

#define DEFINE_ROUTE_REQUESTMETHOD (   METHOD,
  HTTP_METHOD 
)
Value:
Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&, Next&)>& lambda) \
const { \
return *(dispatcher->nextRoute = std::make_shared<Route>( \
HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::MiddlewareDispatcher>(lambda))) \
.get(); \
} \
Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
return *(dispatcher->nextRoute = std::make_shared<Route>( \
HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::ApplicationDispatcher>(lambda))) \
.get(); \
}

Definition at line 55 of file Route.cpp.

57 { \
58 return *(dispatcher->nextRoute = std::make_shared<Route>( \
59 HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::MiddlewareDispatcher>(lambda))) \
60 .get(); \
61 } \
62 Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
63 return *(dispatcher->nextRoute = std::make_shared<Route>( \
64 HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::ApplicationDispatcher>(lambda))) \
65 .get(); \
66 }