Contents|Index|Previous|Next

Miscellaneous ostream utilities

You may need to use the following ostream methods for housekeeping.

    ostream& flush ()
    Method

Deliver any pending buffered output for this ostream.

    int ostream::opfx ()
    Method

opfx is a prefix method for operations on ostream objects; it is designed to be called before any further processing. See the following method, ostream::osfx, for the converse of opfx functionality.

opfx tests that the stream is in state good, and if so flushes any stream tied to this one. The result is 1 when opfx succeeds; else (if the stream state is not good), the result is 0.

    void ostream::osfx ()
    Method

osfx is a suffix method for operations on ostream objects; it is designed to be called at the conclusion of any processing. All the ostream methods end by calling osfx. See the previous method, ostream::opfx, for the converse of osfx functionality. If the unitbuf flag is set for this stream, osfx flushes any buffered output for it.

If the stdio flag is set for this stream, osfx flushes any output buffered for the C output streams, stdout and stderr.