maph 1.0.0 High-Performance Memory-Mapped Key-Value Database with O(1) Lookups

Loading...
Searching...
No Matches
Public Member Functions | List of all members
httplib::detail::RegexMatcher Class Referencefinal

Performs std::regex_match on request path and stores the result in Request::matches. More...

`#include <httplib.h>`

Inheritance diagram for httplib::detail::RegexMatcher:
Collaboration diagram for httplib::detail::RegexMatcher:

## Public Member Functions
| RegexMatcher (const std::string &pattern)
bool | match (Request &request) const override
const std::string & | pattern () const

## Detailed Description

Performs std::regex_match on request path and stores the result in Request::matches.

Note that regex match is performed directly on the whole request. This means that wildcard patterns may match multiple path segments with /: "/begin/(.*)/end" will match both "/begin/middle/end" and "/begin/1/2/end".

Definition at line 1042 of file httplib.h.

## Constructor & Destructor Documentation

## ◆ RegexMatcher()

httplib::detail::RegexMatcher::RegexMatcher | ( | const std::string & | pattern | ) |
| inline

Definition at line 1044 of file httplib.h.

## Member Function Documentation

## ◆ match()

bool httplib::detail::RegexMatcher::match | ( | Request & | request | ) | const
| inline override virtual

Implements httplib::detail::MatcherBase.

Definition at line 7248 of file httplib.h.

References httplib::Request::matches, httplib::Request::path, and httplib::Request::path_params.

## ◆ pattern()

const std::string & httplib::detail::MatcherBase::pattern | ( |  | ) | const
| inline inherited

Definition at line 986 of file httplib.h.

Referenced by httplib::detail::PathParamsMatcher::PathParamsMatcher().

Here is the caller graph for this function:

The documentation for this class was generated from the following file:

- integrations/rest_api/httplib.h