Sun Studio 12: C++ User's Guide

14.12 iostream Terminology

The iostream library descriptions often use terms similar to terms from general programming, but with specialized meanings. The following table defines these terms as they are used in discussing the iostream library.

Table 14–4 iostream Terminology

iostream Term

Definition  

Buffer

A word with two meanings, one specific to the iostream package and one more generally applied to input and output.

When referring specifically to the iostream library, a buffer is an object of the type defined by the class streambuf.

A buffer, generally, is a block of memory used to make efficient transfer of characters for input of output. With buffered I/O, the actual transfer of characters is delayed until the buffer is full or forcibly flushed. 

An unbuffered buffer refers to a streambuf where there is no buffer in the general sense defined above. This chapter avoids use of the term buffer to refer to streambufs. However, the man pages and other C++ documentation do use the term buffer to mean streambufs.

Extraction

The process of taking input from an iostream.

Fstream

An input or output stream specialized for use with files. Refers specifically to a class derived from class iostream when printed in courier font.

Insertion

The process of sending output into an iostream.

iostream

Generally, an input or output stream. 

iostream library

The library implemented by the include files iostream.h, fstream.h, strstream.h, iomanip.h, and stdiostream.h. Because iostream is an object-oriented library, you should extend it. So, some of what you can do with the iostream library is not implemented.

Stream

An iostream, fstream, strstream, or user-defined stream in general.

Streambuf

A buffer that contains a sequence of characters with a put or get pointer, or both. When printed in courier font, it means the particular class. Otherwise, it refers generally to any object of class streambuf or a class derived from streambuf. Any stream object contains an object, or a pointer to an object, of a type derived from streambuf.

Strstream

An iostream specialized for use with character arrays. It refers to the specific class when printed in courier font.