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

Go to the source code of this file.

Namespaces

namespace  express
 

Macros

#define DEFINE_ROOTROUTE_REQUESTMETHOD(METHOD, HTTP_METHOD)
 

Macro Definition Documentation

◆ DEFINE_ROOTROUTE_REQUESTMETHOD

#define DEFINE_ROOTROUTE_REQUESTMETHOD (   METHOD,
  HTTP_METHOD 
)
Value:
Route& RootRoute::METHOD(const RootRoute& rootRoute) const { \
return routes().emplace_back(HTTP_METHOD, "", rootRoute.getDispatcher()); \
} \
Route& RootRoute::METHOD(const std::string& relativeMountPath, const RootRoute& rootRoute) const { \
return routes().emplace_back(HTTP_METHOD, relativeMountPath, rootRoute.getDispatcher()); \
} \
Route& RootRoute::METHOD(const std::string& relativeMountPath, \
const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&, Next&)>& lambda) \
const { \
return routes().emplace_back(HTTP_METHOD, relativeMountPath, std::make_shared<dispatcher::MiddlewareDispatcher>(lambda)); \
} \
Route& RootRoute::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&, Next&)>& lambda) \
const { \
return routes().emplace_back(HTTP_METHOD, "", std::make_shared<dispatcher::MiddlewareDispatcher>(lambda)); \
} \
Route& RootRoute::METHOD(const std::string& relativeMountPath, \
const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
return routes().emplace_back(HTTP_METHOD, relativeMountPath, std::make_shared<dispatcher::ApplicationDispatcher>(lambda)); \
} \
Route& RootRoute::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
return routes().emplace_back(HTTP_METHOD, "", std::make_shared<dispatcher::ApplicationDispatcher>(lambda)); \
}

Definition at line 57 of file RootRoute.cpp.

58 { \
59 return routes().emplace_back(HTTP_METHOD, "", rootRoute.getDispatcher()); \
60 } \
61 Route& RootRoute::METHOD(const std::string& relativeMountPath, const RootRoute& rootRoute) const { \
62 return routes().emplace_back(HTTP_METHOD, relativeMountPath, rootRoute.getDispatcher()); \
63 } \
64 Route& RootRoute::METHOD(const std::string& relativeMountPath, \
65 const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&, Next&)>& lambda) \
66 const { \
67 return routes().emplace_back(HTTP_METHOD, relativeMountPath, std::make_shared<dispatcher::MiddlewareDispatcher>(lambda)); \
68 } \
69 Route& RootRoute::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&, Next&)>& lambda) \
70 const { \
71 return routes().emplace_back(HTTP_METHOD, "", std::make_shared<dispatcher::MiddlewareDispatcher>(lambda)); \
72 } \
73 Route& RootRoute::METHOD(const std::string& relativeMountPath, \
74 const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
75 return routes().emplace_back(HTTP_METHOD, relativeMountPath, std::make_shared<dispatcher::ApplicationDispatcher>(lambda)); \
76 } \
77 Route& RootRoute::METHOD(const std::function<void(const std::shared_ptr<Request>&, const std::shared_ptr<Response>&)>& lambda) const { \
78 return routes().emplace_back(HTTP_METHOD, "", std::make_shared<dispatcher::ApplicationDispatcher>(lambda)); \
79 }