wordReListMatcher Class Reference

A wrapper for matching a List of wordRe. More...

Public Member Functions

 wordReListMatcher (const UList< wordRe > &)
 Construct from a List of wordRe. More...
 
label size () const
 
bool empty () const
 
const UList< wordRe > & operator() () const
 Return underlying list of wordRe. More...
 
bool match (const string &, bool literalMatch=false) const
 Return true if string matches any of the regular expressions. More...
 

Detailed Description

A wrapper for matching a List of wordRe.

Note: The constructor should remain non-explicit. This allows automatic conversion from UList<wordRe> to wordReListMatcher in search functions.

Source files

Definition at line 53 of file wordReListMatcher.H.

Constructor & Destructor Documentation

◆ wordReListMatcher()

wordReListMatcher ( const UList< wordRe > &  lst)
inline

Construct from a List of wordRe.

Definition at line 29 of file wordReListMatcherI.H.

Member Function Documentation

◆ size()

Foam::label size ( ) const
inline

Definition at line 40 of file wordReListMatcherI.H.

◆ empty()

bool empty ( ) const
inline

Definition at line 46 of file wordReListMatcherI.H.

◆ operator()()

const Foam::UList< Foam::wordRe > & operator() ( ) const
inline

Return underlying list of wordRe.

Definition at line 53 of file wordReListMatcherI.H.

◆ match()

bool match ( const string str,
bool  literalMatch = false 
) const
inline

Return true if string matches any of the regular expressions.

Smart match as regular expression or as a string. Optionally specify a literal match only.

Definition at line 59 of file wordReListMatcherI.H.

Referenced by Foam::findStrings(), and IOobjectList::lookup().

Here is the caller graph for this function:

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