Go to main content
Oracle® Developer Studio 12.6: C++ User's Guide

Exit Print View

Updated: July 2017
 
 

13.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 29  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 monospace font.
Insertion
The process of sending output into an iostream.
iostream
Generally, an input or output stream.
iostream library
Refers to a 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.
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 monospace 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 monospace font.