This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
AW: standard library: stringstreams
- To: egcs at cygnus dot com, "'rich dot c at es dot co dot nz'" <rich dot c at es dot co dot nz>
- Subject: AW: standard library: stringstreams
- From: Kühl, Dietmar <Dietmar dot Kuehl at IZB-SOFT dot de>
- Date: Mon, 18 Jan 1999 13:29:25 +0100
Hi,
> Is there any way I can add support for stringstreams to egcs, perhaps by
> way
> of a 3rd party library? Short of actually writing it myself, which I'm by
> no means qualified to do :o)
>
Actually, implementing the string stream classes is fairly easy (well, in
the
implementation I made available, there are some minor bugs...): All you have
to do is to derive a class 'stringbuf' from 'streambuf' (just to get string
streams
for 'string' this is sufficient; for a completely conforming implementation,
it has
to be template on the character type and a corresponding traits type) and
implement the members 'overflow()', 'underflow()', and 'uflow()'. If you
need better
performance you would also override 'xsputn()' and 'xsgetn()' and for random
access the seek members.
However, most of the stuff is already present in the version I have made
available
at
<ftp://ftp.informatik.uni-konstanz.de/pub/algo/personal/kuehl/sstream.tgz>.
... and a first release of my IOStream library is also coming soon: It is
not yet
complete and fast but much closer to the standard than the version in the
old
libstdc++ (I don't know the current state of the libstdc++ efforts at
Cygnus).
dk