Go to the documentation of this file.
58 std::swap(type_, rhs.type_);
64 if (!literal && isPattern())
69 return !compare(text);
106 <<
"Zero-length regex"
118 <<
"Wrong token type - expected word or string, found "
124 <<
"Bad token - could not get keyType";
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A class for handling words, derived from Foam::string.
bool isPattern() const noexcept
The keyType is treated as a pattern, not as literal string.
keyType()
Default construct, empty literal.
const string & stringToken() const
Return const reference to the string contents.
virtual Ostream & writeQuoted(const std::string &str, const bool quoted=true)
Write std::string surrounded by quotes.
Istream & operator>>(Istream &, directionInfo &)
A token holds an item read from Istream.
bool isQuotedString() const noexcept
Token is (quoted) STRING (string variant)
bool isWord() const noexcept
Token is word-variant (WORD, DIRECTIVE)
regExpCxx regExp
Selection of preferred regular expression implementation.
void swap(keyType &rhs)
Swap contents. Self-swapping is a no-op.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
A class for handling keywords in dictionaries.
InfoProxy< token > info() const
Return info proxy for printing token information to a stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
bool match(const std::string &text) const
True if the regex matches the entire text.
bool assign(const token &tok)
Assign from word or string token.
static const keyType null
An empty keyType.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
OBJstream os(runTime.globalPath()/outputName)
const word & wordToken() const
Return const reference to the word contents.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool good() const noexcept
True if token is not UNDEFINED or ERROR.
void setBad()
Set stream state to be 'bad'.
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.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool match(const std::string &text, bool literal=false) const
Smart match as regular expression or as a string.