42 case token::tokenType::FLAG :
48 case token::tokenType::DIRECTIVE :
55 case token::tokenType::EXPRESSION :
62 case token::tokenType::VARIABLE :
69 case token::tokenType::VERBATIM :
81 case token::tokenType::CHAR_DATA :
114 if (!str || len <= 0)
return *
this;
116 const char* last = (str + len);
120 #if __cplusplus >= 201703L 121 os_ << std::string_view(str, len);
123 for (
const char* iter = str; iter != last; ++iter)
142 unsigned backslash = 0;
143 for (
auto iter = str; iter != last; ++iter)
145 const char c = *iter;
183 if (!str)
return *
this;
185 const char* last = (str + strlen(str));
208 return writeQuoted(str.data(), str.size(),
true);
246 beginRawWrite(
count);
259 <<
"stream format not binary" 280 std::streamsize
count 294 for (
unsigned short i = 0; i < indentLevel_*indentSize_; ++i)
325 return os_.fill(fillch);
343 return os_.precision();
349 return os_.precision(
p);
Begin block [isseparator].
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.
const word & wordToken() const
Return const reference to the word contents.
A token holds an item read from Istream.
virtual void endl() override
Add newline and flush stream.
tokenType type() const noexcept
Return the token type.
Begin list [isseparator].
virtual Ostream & writeRaw(const char *data, std::streamsize count) override
Low-level raw binary output.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual int precision() const override
Get precision of output field.
A class for handling words, derived from Foam::string.
virtual bool beginRawWrite(std::streamsize count) override
Begin marker for low-level raw binary output.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
virtual bool endRawWrite() override
End marker for low-level raw binary output.
errorManip< error > abort(error &err)
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual bool write(const token &tok) override
Write token to stream or otherwise handle it.
const string & stringToken() const
Return const reference to the string contents.
word format(conversionProperties.get< word >("format"))
virtual void indent() override
Add indentation characters.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const dimensionedScalar c
Speed of light in a vacuum.
virtual void flush() override
Flush stream.
virtual int width() const override
Get width of output field.
virtual char fill() const override
Get the current padding character.
Hash - directive or start verbatim string.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...