This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

AW: standard library: stringstreams


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]