TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: HERBERT BUSHONG
from: JERRY COFFIN
date: 1997-08-15 10:03:00
subject: fstream identifying mode

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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.