On (13 Aug 97) Herbert Bushong wrote to Jerry Coffin...
::> class my_stream : public fstream {
::> int mode_;
HB> I don't know if there's a way to use it, but the filebuf class already
HB> has a mode member (protected:) which stores this information. Still,
HB> deriving a new class similar to the above seems a safer/easier way to
HB> capture the parameter...
At the moment it certainly is. Once things settle down completely and
we have some decent documentation on the iostream classes, I think it'll
be likely that you can retrieve this fairly easily from filebuf.
However, right now, the iostream classes included with compilers vary
extremely widely. Some are nearly unchanged since the ARM, others are
nearly current with the draft standard.
Unfortunately, most are somewhere in between, often with extensions of
their own mixed in. While this sort of thing is nearly inevitable
while a standard is being written (the same thing happened while the C
standard was being written) and for a few years after it's finished,
it's still a pain to deal with. Code reuse is wonderful, but in some
cases it's just not worth the trouble, and writing your own new code is
easier.
Later,
Jerry.
... The Universe is a figment of its own imagination.
--- PPoint 1.90
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|