#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 |
| const std::shared_ptr< Response > & | getResponse () const |
| int | getFlags () const |
| void | next (const std::string &how) const |
| bool | nextRouterCalled () const |
| bool | dispatchNext (bool strictRouting, bool caseInsensitiveRouting, bool mergeParams) |
Private Attributes | |
| std::shared_ptr< Request > | request |
| std::shared_ptr< Response > | response |
| RootRoute * | rootRoute = nullptr |
| Route * | lastRoute = nullptr |
| Route * | currentRoute = nullptr |
| 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< web::http::legacy::in6::Server >::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 | ( | bool | strictRouting, |
| bool | caseInsensitiveRouting, | ||
| bool | mergeParams ) |
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().
| int express::Controller::getFlags | ( | ) | const |
Definition at line 102 of file Controller.cpp.
References flags.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| const std::shared_ptr< Request > & express::Controller::getRequest | ( | ) | const |
Definition at line 94 of file Controller.cpp.
References request.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), express::dispatcher::RouterDispatcher::dispatch(), and express::dispatcher::matchMountPointImpl().
| const std::shared_ptr< Response > & express::Controller::getResponse | ( | ) | const |
Definition at line 98 of file Controller.cpp.
References response.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), express::dispatcher::RouterDispatcher::dispatch(), and express::RootRoute::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 | ( | ) | const |
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().
| 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().
|
private |
Definition at line 95 of file Controller.h.
Referenced by Controller(), dispatchNext(), next(), nextRouterCalled(), operator=(), and setCurrentRoute().
|
mutableprivate |
Definition at line 99 of file Controller.h.
Referenced by Controller(), dispatchNext(), getFlags(), next(), nextRouterCalled(), and operator=().
|
mutableprivate |
Definition at line 94 of file Controller.h.
Referenced by Controller(), dispatchNext(), next(), nextRouterCalled(), and operator=().
|
private |
Definition at line 97 of file Controller.h.
Referenced by Controller(), Controller(), next(), and operator=().
|
private |
Definition at line 89 of file Controller.h.
Referenced by Controller(), Controller(), getRequest(), and operator=().
|
private |
Definition at line 90 of file Controller.h.
Referenced by Controller(), Controller(), getResponse(), and operator=().
|
private |
Definition at line 92 of file Controller.h.
Referenced by Controller(), next(), operator=(), and setRootRoute().