|
SNode.C
|
Classes | |
| class | ApplicationDispatcher |
| class | MiddlewareDispatcher |
| class | RouterDispatcher |
Functions | |
| std::vector< std::string > | explode (const std::string &input, char delim) |
| const std::regex & | pathRegex () |
| std::smatch | matchResult (const std::string &cpath) |
| bool | hasResult (const std::string &cpath) |
| void | setParams (const std::string &cpath, Request &req) |
| std::unordered_map< std::string, std::string > | parseQuery (std::string_view qs) |
| std::pair< std::regex, std::vector< std::string > > | compileParamRegex (std::string_view mountPath, bool isPrefix, bool strictRouting, bool caseInsensitive) |
| bool | querySupersetMatches (const std::unordered_map< std::string, std::string > &rq, const std::unordered_map< std::string, std::string > &need) |
| bool | boundaryPrefix (std::string_view path, std::string_view base, bool caseInsensitive) |
| bool | equalPath (std::string_view a, std::string_view b, bool caseInsensitive) |
| std::string_view | trimOneTrailingSlash (std::string_view s) |
| void | splitPathAndQuery (std::string_view url, std::string_view &path, std::string_view &query) |
| bool | ieq (char a, char b) |
| template<typename RequestLike > | |
| bool | matchAndFillParams (const std::regex &rx, const std::vector< std::string > &names, std::string_view reqPath, RequestLike &req) |
| bool express::dispatcher::boundaryPrefix | ( | std::string_view | path, |
| std::string_view | base, | ||
| bool | caseInsensitive | ||
| ) |
Definition at line 233 of file regex_utils.cpp.
Referenced by express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| std::pair< std::regex, std::vector< std::string > > express::dispatcher::compileParamRegex | ( | std::string_view | mountPath, |
| bool | isPrefix, | ||
| bool | strictRouting, | ||
| bool | caseInsensitive | ||
| ) |
Definition at line 156 of file regex_utils.cpp.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| bool express::dispatcher::equalPath | ( | std::string_view | a, |
| std::string_view | b, | ||
| bool | caseInsensitive | ||
| ) |
Definition at line 265 of file regex_utils.cpp.
References ieq().
Referenced by express::dispatcher::ApplicationDispatcher::dispatch().
| std::vector< std::string > express::dispatcher::explode | ( | const std::string & | input, |
| char | delim | ||
| ) |
Definition at line 54 of file regex_utils.cpp.
Referenced by setParams().
| bool express::dispatcher::hasResult | ( | const std::string & | cpath | ) |
Definition at line 96 of file regex_utils.cpp.
References pathRegex().
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), and express::dispatcher::MiddlewareDispatcher::dispatch().
|
inline |
Definition at line 84 of file regex_utils.h.
Referenced by equalPath().
|
inline |
Definition at line 108 of file regex_utils.h.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| std::smatch express::dispatcher::matchResult | ( | const std::string & | cpath | ) |
Definition at line 88 of file regex_utils.cpp.
References pathRegex().
Referenced by setParams().
| std::unordered_map< std::string, std::string > express::dispatcher::parseQuery | ( | std::string_view | qs | ) |
Definition at line 129 of file regex_utils.cpp.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| const std::regex & express::dispatcher::pathRegex | ( | ) |
Definition at line 82 of file regex_utils.cpp.
Referenced by hasResult(), and matchResult().
| bool express::dispatcher::querySupersetMatches | ( | const std::unordered_map< std::string, std::string > & | rq, |
| const std::unordered_map< std::string, std::string > & | need | ||
| ) |
Definition at line 222 of file regex_utils.cpp.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| void express::dispatcher::setParams | ( | const std::string & | cpath, |
| express::Request & | req | ||
| ) |
Definition at line 102 of file regex_utils.cpp.
References explode(), matchResult(), express::Request::params, and express::Request::url.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), and express::dispatcher::MiddlewareDispatcher::dispatch().
| void express::dispatcher::splitPathAndQuery | ( | std::string_view | url, |
| std::string_view & | path, | ||
| std::string_view & | query | ||
| ) |
Definition at line 284 of file regex_utils.cpp.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().
| std::string_view express::dispatcher::trimOneTrailingSlash | ( | std::string_view | s | ) |
Definition at line 277 of file regex_utils.cpp.
Referenced by express::dispatcher::ApplicationDispatcher::dispatch(), express::dispatcher::MiddlewareDispatcher::dispatch(), and express::dispatcher::RouterDispatcher::dispatch().