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 | nextRouter () |
bool | dispatchNext (const std::string &parentMountPath) |
void | setStrictRouting (bool strictRouting) |
bool | getStrictRouting () const |
Private Attributes | |
std::shared_ptr< Request > | request |
std::shared_ptr< Response > | response |
RootRoute * | rootRoute = nullptr |
Route * | lastRoute = nullptr |
Route * | currentRoute = nullptr |
bool | strictRouting |
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 ) |
express::Controller::Controller | ( | const Controller & | controller | ) |
Definition at line 62 of file Controller.cpp.
References Controller(), flags, and lastTick.
Referenced by Controller().
bool express::Controller::dispatchNext | ( | const std::string & | parentMountPath | ) |
Definition at line 132 of file Controller.cpp.
References flags, NEXT, NEXT_ROUTE, and NEXT_ROUTER.
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.
const std::shared_ptr< Response > & express::Controller::getResponse | ( | ) |
Definition at line 98 of file Controller.cpp.
bool express::Controller::getStrictRouting | ( | ) | const |
void express::Controller::next | ( | const std::string & | how | ) | const |
Definition at line 106 of file Controller.cpp.
References flags, lastTick, NEXT, NEXT_ROUTE, and NEXT_ROUTER.
bool express::Controller::nextRouter | ( | ) |
Definition at line 122 of file Controller.cpp.
References flags, and NEXT_ROUTER.
|
noexcept |
Definition at line 72 of file Controller.cpp.
void express::Controller::setCurrentRoute | ( | Route * | currentRoute | ) |
Definition at line 90 of file Controller.cpp.
void express::Controller::setRootRoute | ( | RootRoute * | rootRoute | ) |
Definition at line 86 of file Controller.cpp.
void express::Controller::setStrictRouting | ( | bool | strictRouting | ) |
Definition at line 151 of file Controller.cpp.
References strictRouting.
Referenced by express::dispatcher::RouterDispatcher::dispatch().
|
private |
Definition at line 99 of file Controller.h.
|
mutableprivate |
Definition at line 105 of file Controller.h.
Referenced by Controller(), dispatchNext(), getFlags(), next(), nextRouter(), and operator=().
|
mutableprivate |
Definition at line 98 of file Controller.h.
|
private |
Definition at line 103 of file Controller.h.
Referenced by Controller(), Controller(), next(), and operator=().
|
private |
Definition at line 93 of file Controller.h.
|
private |
Definition at line 94 of file Controller.h.
|
private |
Definition at line 96 of file Controller.h.
|
private |
Definition at line 101 of file Controller.h.
Referenced by getStrictRouting(), and setStrictRouting().