35 inline void Foam::prefixOSstream::checkWritePrefix()
37 if (printPrefix_ && !prefix_.empty())
50 const string& streamName,
51 IOstreamOption streamOpt
54 OSstream(
os, streamName, streamOpt),
64 os <<
"prefixOSstream ";
104 const size_t len = strlen(str);
125 return writeQuoted(str.data(), str.size(),
true);
160 std::streamsize
count
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.
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.
virtual void indent() override
Add indentation characters.
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.
OBJstream os(runTime.globalPath()/outputName)
virtual void indent() override
Add indentation characters.
const dimensionedScalar c
Speed of light in a vacuum.
virtual void print(Ostream &os) const override
Print stream description to Ostream.
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.