File: iosbase.yo

package info (click to toggle)
c%2B%2B-annotations 10.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,536 kB
  • ctags: 3,247
  • sloc: cpp: 19,157; makefile: 1,521; ansic: 165; sh: 128; perl: 90
file content (26 lines) | stat: -rw-r--r-- 1,738 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
The class hi(ios_base)tt(std::ios_base) forms the foundation of all I/O
operations, and defines, among other things, facilities for inspecting the
    i(state of I/O streams) and most i(output formatting) facilities. Every
stream class of the I/O library is, through the class ti(ios), em(derived)
from this class, and em(inherits) its capabilities.  As tt(ios_base) is the
foundation on which all bf(C++) I/O was built, we introduce it here as the
first class of the bf(C++) I/O library.

Note that, as in bf(C), I/O in bf(C++) is em(not) part of the language
(although it em(is) part of the i(ANSI/ISO) standard on bf(C++)).  Although it
is technically possible to ignore all predefined I/O facilities, nobody does
so, and the I/O library therefore represents a em(de facto) I/O standard for
bf(C++). Also note that, as mentioned before, the iostream classes themselves
are not responsible for the eventual I/O, but delegate this to an auxiliary
class: the class ti(streambuf) or its derivatives.

It is neither possible nor required to construct an tt(ios_base) object
directly. Its construction is always a side-effect of constructing an object
further down the class hierarchy, like tt(std::ios). tt(Ios) is the next
class down the iostream hierarchy (see figure ref(IOCLASSESFIG)). Since all
stream classes in turn inherit from tt(ios), and thus also from tt(ios_base),
the distinction between tt(ios_base) and ti(ios) is in practice not
important. Therefore, facilities actually provided by tt(ios_base) will be
discussed as facilities provided by tt(ios). The reader who is interested in
the true class in which a particular facility is defined should consult the
relevant header files (e.g., ti(ios_base.h) and ti(basic_ios.h)).