60 #ifndef Foam_OFstream_H 61 #define Foam_OFstream_H 158 virtual const std::ostream&
stdStream()
const override;
161 virtual std::ostream&
stdStream()
override;
190 #ifdef Foam_IOstream_extras 213 extern OFstream
Snull;
Generic output stream using a standard (STL) stream.
A wrapped std::ofstream with possible compression handling (ogzstream) that behaves much like a std::...
bool is_appending() const noexcept
True if opened in append mode and file already existed.
A class for handling file names.
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
~OFstream()
Destructor. Possibly invokes an atomic rename (preference defined during construction) ...
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
void print(Ostream &os) const override
Print stream description.
bool is_appending() const noexcept
True if opened in append mode and file already existed.
OFstream Snull
Global predefined null output stream "/dev/null".
A simple container for options an IOstream can normally have.
virtual const fileName & name() const override
Get the name of the output serial stream. (eg, the name of the Fstream file name) ...
bool is_atomic() const noexcept
True if file creation behaves as atomic.
bool is_atomic() const noexcept
True if file creation behaves as atomic.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
constexpr IOstreamOption(streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
Default construct (ASCII, UNCOMPRESSED, currentVersion) or construct with format, compression...
virtual const std::ostream & stdStream() const override
Const access to underlying std::ostream.
atomicType
Atomic operations (output)
virtual void rewind()
Rewind the stream so that it may be written again. Reopens the file (truncation)
no append (truncates existing)
Representation of a major/minor version number.
ClassName("OFstream")
Declare type-name (with debug switch)
OBJstream os(runTime.globalPath()/outputName)
appendType
File appending (NO_APPEND | APPEND_APP | APPEND_ATE)
OFstream(std::nullptr_t)
Construct a null output file stream that behaves like /dev/null.
rAUs append(new volScalarField(IOobject::groupName("rAU", phase1.name()), 1.0/(U1Eqn.A()+byDt(max(phase1.residualAlpha() - alpha1, scalar(0)) *rho1))))
Macro definitions for declaring ClassName(), NamespaceName(), etc.
streamFormat
Data format (ascii | binary)
Ostream(const Ostream &)=default
Copy construct.