100 return !(type_ & option::REGEX);
106 return (type_ & option::REGEX);
112 opt = option(opt & 0x0F);
119 string::stripInvalid<word>(*this);
129 type_ = option::REGEX;
136 type_ = option::LITERAL;
145 string::stripInvalid<word>(*this);
148 type_ = option::LITERAL;
155 type_ = option::LITERAL;
194 type_ = option::LITERAL;
201 type_ = option::LITERAL;
208 type_ = option::REGEX;
A class for handling keywords in dictionaries.
bool match(const UList< wordRe > &patterns, const std::string &text)
Return true if text matches one of the regular expressions.
void uncompile() noexcept
Mark as literal string.
bool compile() noexcept
Mark as regular expression.
void setType(option opt, bool adjust=false)
Change the representation, optionally stripping invalid word characters when changing to a literal...
A class for handling words, derived from Foam::string.
static int debug
Debugging.
bool isPattern() const noexcept
The keyType is treated as a pattern, not as literal string.
keyType()
Default construct, empty literal.
static bool valid(char c)
Is this character valid for a word?
void assign(Field< Tout > &result, const Field< T1 > &a, const UnaryOp &op)
Populate a field as the result of a unary operation on an input.
bool isLiteral() const noexcept
The keyType is treated as literal, not as pattern.
void operator=(const std::string &)=delete
No assignment where type could be indeterminate.
const dimensionedScalar c
Speed of light in a vacuum.
option
Enumeration for the data type and search/match modes (bitmask)
static bool valid(const char c)
Test for valid keyType character?
bool operator()(const std::string &text) const
Perform smart match on text, as per match()
void clear()
Clear string and set as literal.