Topic: i/ostreams are no streams, but only clients of the real stream(buf
Author: mmauhart@ping.at (Markus Mauhart)
Date: 1995/07/19 Raw View
//had problem with newsreader .. once again the rest of previous mail :
[PROPOSAL]-------------------------------------------------------------
insert the following paragraphs between [lib.input.output] "1" and "2" of
the draft released for public comment :
? The standard C representation for stream resources are handles (int) .?
In C++ abstract class streambuf is the client's interface to a wide
variety of "streaming" resources (sometimes called streamable manifolds
;-)
This interface is general enough to support files , pipes , queues and raw
memory or to represent a streaming network layer . And in todays computing
environment its the fastest possible interface to all those resources .
class streambuf essetially is a nicely interfaced cache for its general
resource , represented through bounded C arrays which are accessed inline
by class streambuf's implemented client side interface . Only on cache
miss the server related part of class streambuf (i.e. its virtual member
functions to be implemented by derived classes) joins the party .
Hence the actual connection to a special resource type has to be done in
derivations of class streambuf . This means opening and closing access to
the resource , setting up , loading and flushing the arrays used for i/o
caching . For some widely used resources these derivations are part of
this standard {here comes a list} .
A special kind of client using class streambuf to access its resource is
abstract class ios together with its concrete derivations class istream
and class ostream . It is tied via a pointer to its streambuf and supports
formatted i/o .
Special derivations of i/ostream are hard linked to the above mentioned
special streambuf derivations {here comes a list}; typically they control
lifetime of their streambuf and forward its resource specific interface .
But note that formatted i/o can be done as well with an i/ostream at
runtime bound to specialStreambufInstance .
---------------------------------------------------------------------EOF
------------------
f(ab) = f(a)f(b) .
## CrossPoint v3.02 ##