|
SNode.C
|
#include <Controller.h>
Public Types | |
| enum | Flags { NONE = 0 , NEXT = 1 << 0 , NEXT_ROUTE = 1 << 1 , NEXT_ROUTER = 1 << 2 } |
Public Member Functions | |
| Controller (const std::shared_ptr< web::http::server::Request > &request, const std::shared_ptr< web::http::server::Response > &response) | |
| Controller (const Controller &controller) | |
| Controller & | operator= (const Controller &controller) noexcept |
| void | setRootRoute (RootRoute *rootRoute) |
| void | setCurrentRoute (Route *currentRoute) |
| const std::shared_ptr< Request > & | getRequest () |
| const std::shared_ptr< Response > & | getResponse () |
| int | getFlags () const |
| void | next (const std::string &how) const |
| bool | nextRouterCalled () |
| bool | dispatchNext (const std::string &parentMountPath) |
| bool | setStrictRouting (bool strictRouting) |
| bool | getStrictRouting () const |
| bool | setCaseInsensitiveRouting (bool caseInsensitiveRouting) |
| bool | getCaseInsensitiveRouting () const |
Private Attributes | |
| std::shared_ptr< Request > | request |
| std::shared_ptr< Response > | response |
| RootRoute * | rootRoute = nullptr |
| Route * | lastRoute = nullptr |
| Route * | currentRoute = nullptr |
| bool | strictRouting = false |
| bool | caseInsensitiveRouting = false |
| unsigned long | lastTick = 0 |
| int | flags = NONE |
Definition at line 66 of file Controller.h.
| express::Controller::Controller | ( | const std::shared_ptr< web::http::server::Request > & | request, |
| const std::shared_ptr< web::http::server::Response > & | response | ||
| ) |
Definition at line 55 of file Controller.cpp.
References core::EventLoop::getTickCounter(), lastTick, request, and response.
Referenced by express::WebAppT< ServerT >::WebAppT().
| express::Controller::Controller | ( | const Controller & | controller | ) |
Definition at line 62 of file Controller.cpp.
References currentRoute, flags, lastRoute, lastTick, request, response, and rootRoute.
Referenced by express::Next::Next().
| bool express::Controller::dispatchNext | ( | const std::string & | parentMountPath | ) |
Definition at line 132 of file Controller.cpp.
References currentRoute, express::Route::dispatchNext(), flags, lastRoute, NEXT, NEXT_ROUTE, and NEXT_ROUTER.
Referenced by express::Route::dispatch().
| bool express::Controller::getCaseInsensitiveRouting | ( | ) | const |
Definition at line 171 of file Controller.cpp.
References caseInsensitiveRouting.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| int express::Controller::getFlags | ( | ) | const |
Definition at line 102 of file Controller.cpp.
References flags.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), and express::dispatcher::MiddlewareDispatcher::dispatch().
| const std::shared_ptr< Request > & express::Controller::getRequest | ( | ) |
Definition at line 94 of file Controller.cpp.
References request.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| const std::shared_ptr< Response > & express::Controller::getResponse | ( | ) |
Definition at line 98 of file Controller.cpp.
References response.
Referenced by express::RootRoute::dispatch(), express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| bool express::Controller::getStrictRouting | ( | ) | const |
Definition at line 159 of file Controller.cpp.
References strictRouting.
Referenced by express::Route::dispatch(), express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| void express::Controller::next | ( | const std::string & | how | ) | const |
Definition at line 106 of file Controller.cpp.
References currentRoute, express::RootRoute::dispatch(), flags, core::EventLoop::getTickCounter(), lastRoute, lastTick, NEXT, NEXT_ROUTE, NEXT_ROUTER, and rootRoute.
Referenced by express::Next::operator()().
| bool express::Controller::nextRouterCalled | ( | ) |
Definition at line 122 of file Controller.cpp.
References currentRoute, flags, lastRoute, and NEXT_ROUTER.
Referenced by express::dispatcher::RouterDispatcher::dispatch().
|
noexcept |
Definition at line 72 of file Controller.cpp.
References currentRoute, flags, lastRoute, lastTick, request, response, and rootRoute.
Referenced by express::dispatcher::MiddlewareDispatcher::dispatch().
| bool express::Controller::setCaseInsensitiveRouting | ( | bool | caseInsensitiveRouting | ) |
Definition at line 163 of file Controller.cpp.
References caseInsensitiveRouting.
Referenced by express::RootRoute::dispatch().
| void express::Controller::setCurrentRoute | ( | Route * | currentRoute | ) |
Definition at line 90 of file Controller.cpp.
References currentRoute.
Referenced by express::Route::dispatch().
| void express::Controller::setRootRoute | ( | RootRoute * | rootRoute | ) |
Definition at line 86 of file Controller.cpp.
References rootRoute.
Referenced by express::RootRoute::dispatch().
| bool express::Controller::setStrictRouting | ( | bool | strictRouting | ) |
Definition at line 151 of file Controller.cpp.
References strictRouting.
Referenced by express::RootRoute::dispatch(), express::Route::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
|
private |
Definition at line 104 of file Controller.h.
Referenced by getCaseInsensitiveRouting(), and setCaseInsensitiveRouting().
|
private |
Definition at line 101 of file Controller.h.
Referenced by Controller(), dispatchNext(), next(), nextRouterCalled(), operator=(), and setCurrentRoute().
|
mutableprivate |
Definition at line 108 of file Controller.h.
Referenced by Controller(), dispatchNext(), getFlags(), next(), nextRouterCalled(), and operator=().
|
mutableprivate |
Definition at line 100 of file Controller.h.
Referenced by Controller(), dispatchNext(), next(), nextRouterCalled(), and operator=().
|
private |
Definition at line 106 of file Controller.h.
Referenced by Controller(), Controller(), next(), and operator=().
|
private |
Definition at line 95 of file Controller.h.
Referenced by Controller(), Controller(), getRequest(), and operator=().
|
private |
Definition at line 96 of file Controller.h.
Referenced by Controller(), Controller(), getResponse(), and operator=().
|
private |
Definition at line 98 of file Controller.h.
Referenced by Controller(), next(), operator=(), and setRootRoute().
|
private |
Definition at line 103 of file Controller.h.
Referenced by getStrictRouting(), and setStrictRouting().