88 std::unique_ptr<Foam::regExp> regexPtr_;
137 const std::string& str,
162 inline static bool valid(
const char c);
217 inline
bool match(const std::
string& text,
bool literal=false) const;
224 inline
bool operator()(const std::
string& text) const;
229 inline
void operator=(const
wordRe& str);
232 inline
void operator=(const
word& str);
236 void operator=(const
keyType& str);
240 inline
void operator=(const
string& str);
244 inline
void operator=(const std::
string& str);
248 inline
void operator=(const
char* str);
252 inline
void operator=(
wordRe&& str);
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A class for handling keywords in dictionaries.
A token holds an item read from Istream.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
bool assign(const token &tok)
Assign from word or string token.
void set(const std::string &str, const compOption opt=DETECT)
Copy string, auto-test for regular expression or other options.
bool isLiteral() const noexcept
The wordRe is a literal string, not a pattern.
static const wordRe null
An empty wordRe.
static bool valid(const char c)
Test for valid wordRe character?
bool compile()
Compile as regular expression (if possible)
wordRe()
Default construct, empty literal.
compOption
Enumeration with compile options.
@ DETECT
Detect if the string contains meta-characters.
@ DETECT_ICASE
Combined DETECT and ICASE.
@ REGEX
Regular expression.
@ ICASE
Ignore case in regular expression.
@ REGEX_ICASE
Combined REGEX and ICASE.
@ UNKNOWN
Unknown content (for return value).
bool isPattern() const noexcept
The wordRe is a pattern, not a literal string.
void clear()
Clear string and regular expression.
void uncompile()
Mark as literal string, remove any regular expression.
bool match(const std::string &text, bool literal=false) const
Smart match as regular expression or as a string.
void swap(wordRe &str)
Swap contents. Self-swapping is a no-op.
A class for handling words, derived from Foam::string.
OBJstream os(runTime.globalPath()/outputName)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Istream & operator>>(Istream &, directionInfo &)
Includes some standard C++ headers, defines global macros and templates used in multiple places by Op...
Hash function class. The default definition is for primitives. Non-primitives used to hash entries on...
Hashing functor for string and derived string classes.