Functor wrapper of allow/deny lists of wordRe for filtering. More...
#include <wordRes.H>
Public Member Functions | |
| filter (const UList< wordRe > &allow, const UList< wordRe > &deny) noexcept | |
| Construct with allow and deny matchers. | |
| bool | empty () const noexcept |
| No filtering defined. | |
| operator bool () const noexcept | |
| True if filtering is defined. | |
| bool | operator() (const std::string &text) const |
| Apply filter against specified text. | |
Functor wrapper of allow/deny lists of wordRe for filtering.
An empty filter accepts everything. An empty allow accepts everything not in deny. A literal allow match has higher priority than any deny. A regex allow match has lower priority than any deny.
Example (when applied to a list of words),
* input: ( abc apple test other val val1 val2 wall wall1 wall2 ) * allow: ( abc def "t.*" other val val1 "wall.*" ) * deny: ( "[ab].*" "t.*" other "val[0-9]" wall ) * * result: (abc other val val1 wall1 wall2) *
Construct with allow and deny matchers.
Definition at line 205 of file wordResI.H.
References Foam::noexcept.
|
inlinenoexcept |
No filtering defined.
Definition at line 222 of file wordResI.H.
References Foam::noexcept.
Referenced by operator bool().

|
inlineexplicitnoexcept |
True if filtering is defined.
Definition at line 293 of file wordRes.H.
References empty(), and Foam::noexcept.

|
inline |
Apply filter against specified text.
true if no filtering has been defined true if matched but not blocked Definition at line 234 of file wordResI.H.
References wordRe::LITERAL, wordRes::match(), wordRes::matched(), and wordRe::REGEX.
