#include <RegexPattern.h>
Public Member Functions | |
RegexPattern ()=delete | |
RegexPattern (const SBuf &aPattern, int aFlags) | |
~RegexPattern () | |
RegexPattern (RegexPattern &&)=delete | |
bool | caseSensitive () const |
whether the regex differentiates letter case More... | |
bool | isDot () const |
whether this is an "any single character" regex (".") More... | |
bool | match (const char *str) const |
void | print (std::ostream &os, const RegexPattern *previous=nullptr) const |
Private Member Functions | |
MEMPROXY_CLASS (RegexPattern) | |
Private Attributes | |
SBuf | pattern |
a regular expression in the text form, suitable for regcomp(3) More... | |
const int | flags |
bitmask of REG_* flags for regcomp(3) More... | |
regex_t | regex |
a "compiled pattern buffer" filled by regcomp(3) for regexec(3) More... | |
Detailed Description
A regular expression, plain text and compiled representations
Definition at line 23 of file RegexPattern.h.
Constructor & Destructor Documentation
◆ RegexPattern() [1/3]
|
delete |
◆ RegexPattern() [2/3]
Definition at line 18 of file RegexPattern.cc.
References SBuf::c_str(), debugs, Debug::Extra(), flags, Here, pattern, regex, and ToSBuf().
◆ ~RegexPattern()
RegexPattern::~RegexPattern | ( | ) |
Definition at line 36 of file RegexPattern.cc.
References regex.
◆ RegexPattern() [3/3]
|
delete |
Member Function Documentation
◆ caseSensitive()
|
inline |
◆ isDot()
|
inline |
Definition at line 38 of file RegexPattern.h.
References SBuf::length(), and pattern.
◆ match()
|
inline |
◆ MEMPROXY_CLASS()
|
private |
◆ print()
void RegexPattern::print | ( | std::ostream & | os, |
const RegexPattern * | previous = nullptr |
||
) | const |
Attempts to reproduce this regex (context-sensitive) configuration. If the previous regex is nil, may not report default flags. Otherwise, may not report same-as-previous flags (and prepends a space).
Definition at line 42 of file RegexPattern.cc.
References caseSensitive(), flags, and pattern.
Referenced by ACLRegexData::dump(), and operator<<().
Member Data Documentation
◆ flags
|
private |
Definition at line 52 of file RegexPattern.h.
Referenced by RegexPattern(), caseSensitive(), and print().
◆ pattern
|
private |
Definition at line 49 of file RegexPattern.h.
Referenced by RegexPattern(), isDot(), and print().
◆ regex
|
private |
Definition at line 55 of file RegexPattern.h.
Referenced by RegexPattern(), ~RegexPattern(), and match().
The documentation for this class was generated from the following files:
- src/base/RegexPattern.h
- src/base/RegexPattern.cc