#include <RouterDispatcher.h>
Public Member Functions | |
| RouterDispatcher & | setStrictRouting (bool strictRouting) |
| bool | getStrictRouting () const |
| RouterDispatcher & | setCaseInsensitiveRouting (bool caseInsensitiveRouting) |
| bool | getCaseInsensitiveRouting () const |
| RouterDispatcher & | setMergeParams (bool mergeParams) |
| bool | getMergeParams () const |
| std::list< express::Route > & | getRoutes () |
| std::list< std::string > | getRoutes (const std::string &parentMountPath, const MountPoint &mountPoint) const |
| Public Member Functions inherited from express::Dispatcher | |
| Dispatcher (const Dispatcher &)=delete | |
| Dispatcher & | operator= (const Dispatcher &)=delete |
| Dispatcher ()=default | |
| virtual | ~Dispatcher () |
| bool | dispatchNext (Controller &controller, bool strictRouting, bool caseInsensitiveRouting, bool mergeParams) |
Private Member Functions | |
| bool | dispatch (express::Controller &controller, const express::MountPoint &mountPoint, bool strictRoutingUnused, bool caseInsensitiveRoutingUnused, bool mergeParamsUnused) override |
| std::list< std::string > | getRoutes (const std::string &parentMountPath, const MountPoint &mountPoint, bool strictRouting) const override |
Private Attributes | |
| std::list< express::Route > | routes |
| bool | strictRouting = false |
| bool | caseInsensitiveRouting = true |
| bool | mergeParams = false |
| std::regex | regex |
| std::vector< std::string > | names |
Additional Inherited Members | |
| Protected Attributes inherited from express::Dispatcher | |
| std::shared_ptr< Route > | nextRoute = nullptr |
Definition at line 62 of file RouterDispatcher.h.
|
overrideprivatevirtual |
Implements express::Dispatcher.
Definition at line 67 of file RouterDispatcher.cpp.
References caseInsensitiveRouting, express::dispatcher::MountMatchResult::consumedLength, express::dispatcher::MountMatchResult::decodeError, express::Route::dispatch(), core::socket::stream::SocketConnection::getConnectionName(), express::Controller::getFlags(), express::Controller::getRequest(), express::Controller::getResponse(), core::socket::stream::SocketContext::getSocketConnection(), express::Response::getSocketContext(), express::dispatcher::MountMatchResult::isPrefix, logger::LogMessage::LogMessage(), express::dispatcher::matchMountPoint(), mergeParams, express::MountPoint::method, express::Request::method, express::dispatcher::methodMatches(), names, express::Controller::NEXT, express::Controller::nextRouterCalled(), express::dispatcher::MountMatchResult::params, express::Request::path, express::Request::queries, express::MountPoint::relativeMountPath, express::dispatcher::MountMatchResult::requestMatched, express::dispatcher::MountMatchResult::requestQueryPairs, routes, express::dispatcher::ScopedParams::ScopedParams(), express::dispatcher::ScopedPathStrip::ScopedPathStrip(), express::Response::sendStatus(), strictRouting, logger::TRACE, and express::Request::url.
| bool express::dispatcher::RouterDispatcher::getCaseInsensitiveRouting | ( | ) | const |
Definition at line 156 of file RouterDispatcher.cpp.
References caseInsensitiveRouting.
Referenced by express::RootRoute::getCaseInsensitiveRouting().
| bool express::dispatcher::RouterDispatcher::getMergeParams | ( | ) | const |
Definition at line 166 of file RouterDispatcher.cpp.
References mergeParams.
Referenced by express::RootRoute::getMergeParams().
| std::list< Route > & express::dispatcher::RouterDispatcher::getRoutes | ( | ) |
Definition at line 63 of file RouterDispatcher.cpp.
References routes.
Referenced by express::RootRoute::routes().
| std::list< std::string > express::dispatcher::RouterDispatcher::getRoutes | ( | const std::string & | parentMountPath, |
| const MountPoint & | mountPoint ) const |
Definition at line 124 of file RouterDispatcher.cpp.
References getRoutes().
Referenced by express::RootRoute::getRoutes().
|
overrideprivatevirtual |
Implements express::Dispatcher.
Definition at line 129 of file RouterDispatcher.cpp.
References express::Route::getRoute(), express::MountPoint::relativeMountPath, and routes.
Referenced by getRoutes().
| bool express::dispatcher::RouterDispatcher::getStrictRouting | ( | ) | const |
Definition at line 146 of file RouterDispatcher.cpp.
References strictRouting.
Referenced by express::RootRoute::getStrictRouting().
| RouterDispatcher & express::dispatcher::RouterDispatcher::setCaseInsensitiveRouting | ( | bool | caseInsensitiveRouting | ) |
Definition at line 150 of file RouterDispatcher.cpp.
References caseInsensitiveRouting.
Referenced by express::RootRoute::setCaseInsensitiveRouting().
| RouterDispatcher & express::dispatcher::RouterDispatcher::setMergeParams | ( | bool | mergeParams | ) |
Definition at line 160 of file RouterDispatcher.cpp.
References mergeParams.
Referenced by express::RootRoute::setMergeParams().
| RouterDispatcher & express::dispatcher::RouterDispatcher::setStrictRouting | ( | bool | strictRouting | ) |
Definition at line 140 of file RouterDispatcher.cpp.
References strictRouting.
Referenced by express::RootRoute::setStrictRouting().
|
private |
Definition at line 90 of file RouterDispatcher.h.
Referenced by dispatch(), getCaseInsensitiveRouting(), and setCaseInsensitiveRouting().
|
private |
Definition at line 91 of file RouterDispatcher.h.
Referenced by dispatch(), getMergeParams(), and setMergeParams().
|
private |
Definition at line 94 of file RouterDispatcher.h.
Referenced by dispatch().
|
private |
Definition at line 93 of file RouterDispatcher.h.
|
private |
Definition at line 87 of file RouterDispatcher.h.
Referenced by dispatch(), getRoutes(), and getRoutes().
|
private |
Definition at line 89 of file RouterDispatcher.h.
Referenced by dispatch(), getStrictRouting(), and setStrictRouting().