41 #ifndef Foam_prefixOSstream_H 42 #define Foam_prefixOSstream_H 69 inline void checkWritePrefix();
80 const string& streamName,
103 virtual bool write(
const token& tok)
override;
113 const bool quoted=
true 123 virtual Ostream&
write(
const std::string& val)
override;
141 virtual void indent()
override;
Generic output stream using a standard (STL) stream.
virtual void print(Ostream &os) const override
Print stream description to Ostream.
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.
A token holds an item read from Istream.
A simple container for options an IOstream can normally have.
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression...
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual bool write(const token &tok) override
Write token to stream or otherwise handle it.
Version of OSstream that prints a prefix on each line.
A class for handling words, derived from Foam::string.
const string & prefix() const noexcept
Return the stream prefix.
virtual void indent() override
Add indentation characters.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
const dimensionedScalar c
Speed of light in a vacuum.
prefixOSstream(std::ostream &os, const string &streamName, IOstreamOption streamOpt=IOstreamOption())
Construct and set stream status.
virtual Ostream & writeQuoted(const char *str, std::streamsize len, const bool quoted=true) override
Write character/string content, with/without surrounding quotes.