mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 14:08:20 +00:00
sundry accessors/cast-ers; RE_Matcher's track their construction values
This commit is contained in:
parent
17affdb858
commit
d53d2ac755
8 changed files with 50 additions and 3 deletions
9
src/RE.h
9
src/RE.h
|
@ -197,6 +197,7 @@ public:
|
|||
|
||||
// Makes the matcher as specified to date case-insensitive.
|
||||
void MakeCaseInsensitive();
|
||||
bool IsCaseInsensitive() const { return is_case_insensitive; }
|
||||
|
||||
bool Compile(bool lazy = false);
|
||||
|
||||
|
@ -227,6 +228,10 @@ public:
|
|||
const char* PatternText() const { return re_exact->PatternText(); }
|
||||
const char* AnywherePatternText() const { return re_anywhere->PatternText(); }
|
||||
|
||||
// Original text used to construct this matcher. Empty unless
|
||||
// the main ("explicit") constructor was used.
|
||||
const char* OrigText() const { return orig_text.c_str(); }
|
||||
|
||||
unsigned int MemoryAllocation() const
|
||||
{
|
||||
return padded_sizeof(*this)
|
||||
|
@ -235,8 +240,12 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
std::string orig_text;
|
||||
|
||||
detail::Specific_RE_Matcher* re_anywhere;
|
||||
detail::Specific_RE_Matcher* re_exact;
|
||||
|
||||
bool is_case_insensitive = false;
|
||||
};
|
||||
|
||||
} // namespace zeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue