File: protectedstreambuf.yo

package info (click to toggle)
c%2B%2B-annotations 12.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,044 kB
  • sloc: cpp: 24,337; makefile: 1,517; ansic: 165; sh: 121; perl: 90
file content (29 lines) | stat: -rw-r--r-- 1,554 bytes parent folder | download | duplicates (3)
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
27
28
29
The em(protected) members of the class tt(streambuf) are important for
understanding and using tt(streambuf) objects. Although there are both
protected hi(data member)data members and protected member functions
    hi(member function) defined in the tt(class streambuf) the protected
em(data) members are not mentioned here as using them would violate the
principle of emi(data hiding). As tt(streambuf)'s set of member functions is
quite extensive, it is hardly ever necessary to use its data members
directly. The following subsections do not even list all protected member
functions but only those are covered that are useful for constructing
specializations.

tt(Streambuf) objects control a buffer, used for input and/or output, for
which begin-, actual- and end-pointers have been defined, as depicted in
figure ref(SBBUFFERS).
    figure(iostreams/sbbuffers)
    (Input- and output buffer pointers of the class `streambuf')
    (SBBUFFERS)

tt(Streambuf) offers two protected constructors:
    itemization(
    ittq(streambuf::streambuf())
        (Default (protected) constructor of the tt(class streambuf).)
    ittq(streambuf::streambuf(streambuf const &rhs))
        ((Protected) copy constructor of the tt(class streambuf). Note that
this copy constructor merely copies the values of the data members of tt(rhs):
after using the copy constructor both tt(streambuf) objects refer to the same
data buffer and initially their pointers point at identical positions. Also
note that these are em(not) shared pointers, but only `raw copies'.)
    )