cppannotations/annotations/yo/iostreams/formatting.yo
Frank B. Brokken 777b182edd Moved all files but 'excluded', 'sf', and 'sourcetar' to ./annotations
This allowed me to standardize the sourcetar and sf/* scripts: the base
    directory (containing ./git) is now empty, except for maintenance scripts,
    while the source files and build scripts of the annotations are stored in
    a subdirectory of their own.
2013-05-29 20:44:08 +02:00

19 lines
1.1 KiB
Text

The way information is written to streams (or, occasionally, read from
streams) is controlled by emi(formatting flags).
Formatting is used when it is necessary to, e.g., set the width of an output
field or input buffer and to determine the form (e.g., the emi(radix)) in
which values are displayed. Most formatting features belong to the realm of
the tt(ios) class. Formatting is controlled by flags, defined by the tt(ios)
class. These flags may be manipulated in two ways: using specialized
member functions or using em(manipulators), which are directly inserted into
or extracted from streams. There is no special reason for using either
method; usually both methods are possible. In the following overview
the various member functions are first introduced. Following this the flags
and manipulators themselves are covered. Examples are provided showing how
the flags can be manipulated and what their effects are.
Many manipulators are parameterless and are available once a stream header
file (e.g., tt(iostream)) has been included. Some manipulators require
arguments. To use the latter manipulators the header file ti(iomanip) must be
included.