39 #ifndef Foam_OSstream_H 40 #define Foam_OSstream_H 84 const string& streamName,
92 const string& streamName,
104 const string& streamName,
126 virtual const std::ostream&
stdStream()
const {
return os_; }
129 virtual std::ostream&
stdStream() {
return os_; }
135 virtual ios_base::fmtflags
flags()
const 141 virtual ios_base::fmtflags
flags(
const ios_base::fmtflags
f)
178 const std::string& str,
179 const bool quoted=
true 201 std::streamsize
count 219 virtual void flush();
225 virtual char fill()
const;
229 virtual char fill(
const char fillch);
232 virtual int width()
const;
236 virtual int width(
const int w);
virtual bool endRawWrite()
End marker for low-level raw binary output.
virtual const fileName & name() const
Get the name of the output serial stream. (eg, the name of the Fstream file name) ...
Generic output stream using a standard (STL) stream.
virtual char fill() const
Get the current padding character.
A class for handling file names.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
virtual int precision() const
Get precision of output field.
void setState(std::ios_base::iostate state) noexcept
Set stream state.
void syncState()
Set stream state to match that of the std::ostream.
virtual ios_base::fmtflags flags() const
Get stream flags.
A token holds an item read from Istream.
virtual void endl()
Add newline and flush stream.
virtual void indent()
Add indentation characters.
virtual void print(Ostream &os) const
Print stream description to Ostream.
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.
A class for handling words, derived from Foam::string.
virtual void flush()
Flush stream.
Representation of a major/minor version number.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual bool write(const token &tok)
Write token to stream or otherwise handle it.
virtual Ostream & writeQuoted(const std::string &str, const bool quoted=true)
Write std::string surrounded by quotes.
OBJstream os(runTime.globalPath()/outputName)
Database for solution data, solver performance and other reduced data.
virtual const std::ostream & stdStream() const
Const access to underlying std::ostream.
virtual bool beginRawWrite(std::streamsize count)
Begin marker for low-level raw binary output.
virtual int width() const
Get width of output field.
const dimensionedScalar c
Speed of light in a vacuum.
streamFormat
Data format (ascii | binary)
void operator=(const OSstream &)=delete
No copy assignment.
virtual Ostream & writeRaw(const char *data, std::streamsize count)
Low-level raw binary output.
OSstream(const OSstream &)=default
Copy construct.