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 33 of file Route.cpp.

33#define DEFINE_ROUTE_REQUESTMETHOD(METHOD, HTTP_METHOD) \
34 Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&, Next&)>& lambda) \
35 const { \
36 return *(dispatcher->nextRoute = std::make_shared<Route>( \
37 HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::MiddlewareDispatcher>(lambda))) \
38 .get(); \
39 } \
40 Route& Route::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
41 return *(dispatcher->nextRoute = std::make_shared<Route>( \
42 HTTP_METHOD, mountPoint.relativeMountPath, std::make_shared<dispatcher::ApplicationDispatcher>(lambda))) \
43 .get(); \
44 }