Go to the documentation of this file.
92 word(std::move(static_cast<
word&>(
s)), false),
95 s.type_ = option::LITERAL;
101 word(std::move(
s), false),
108 word(std::move(
s), false),
115 word(std::move(
s), false),
124 return (type_ != option::REGEX);
130 return (type_ & option::REGEX);
143 string::stripInvalid<word>(*
this);
153 type_ = option::REGEX;
160 setType(option::LITERAL, adjust);
167 type_ = option::LITERAL;
179 std::swap(type_,
s.type_);
191 inline void Foam::keyType::operator=(
const keyType&
s)
215 inline void Foam::keyType::operator=(
const word&
s)
218 type_ = option::LITERAL;
222 inline void Foam::keyType::operator=(
const string&
s)
225 type_ = option::REGEX;
229 inline void Foam::keyType::operator=(
const char*
s)
232 type_ = option::LITERAL;
static bool valid(char c)
Is this character valid for a keyType?
A class for handling words, derived from Foam::string.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void swap(keyType &s)
Swap contents. Self-swapping is a no-op.
void clear()
Clear string and set as literal.
bool isPattern() const
The keyType is treated as a pattern, not as literal string.
bool operator()(const std::string &text) const
Perform smart match on text, as per match()
A class for handling keywords in dictionaries.
static int debug
Debugging.
void setType(option opt, bool adjust=false)
Change the representation.
bool compile()
Mark as regular expression.
bool match(const UList< wordRe > &patterns, const std::string &text)
Return true if text matches one of the regular expressions.
void uncompile(bool adjust=false)
Mark as literal, instead of a regular expression.
const dimensionedScalar c
Speed of light in a vacuum.
void swap(std::string &str)
Swap contents. Self-swapping is a no-op.
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 isspace(char c)
Test for horizontal whitespace.
bool isLiteral() const
The keyType is treated as literal, not as pattern.
option
Enumeration for the data type and search/match modes (bitmask)