Boost logo

Boost :

From: Maxim Egorushkin (e-maxim_at_[hidden])
Date: 2003-07-14 14:31:21


"Jonathan D. Turkanis" <commerce_at_[hidden]> wrote in message
news:beu83v$c02$1_at_main.gmane.org...

> I have posted a new version of my library, which has been rewritten to
> incorporate filtering as a basic construct.
> (http://groups.yahoo.com/group/boost/files/streambuf_lib.zip)
>
> In addition to allowing the easy creation of streams and streambuf from
> objects with socket-like interfaces, it provides a convenient interface
for
> defining i/o filters and for combining them in various ways with each
other
> and with types from the standard library (streams, streambufs, containers,
> sequences, codecvts.)

I don't get the idea of reinventing the stream classes. One can use their
rdbuf() member function to change the buffer. Could you please elaborate on
that?

You have read/write member functions of your source/sink/filter concepts
virtual. If one went for efficiency she would stay away from virtual
functions. With such a design you leave a user no choice.

There are too many adapters, IMHO. It obscures. Since each STL sequence
support iterators why don't use it? Generally speaking, there should be only
two adapters (input and output) that take any STL sequence represented by
begin/end iterators.

P.S. There is a very good article by Alexandre Duret-Lutz and Thierry Geraud
"
Improving Object-Oriented Generic Programming". I took some damn good ideas
from there when I was implementing my buffer adapters. You can get it here:
http://www.rsdn.ru/File/5711/duret_lutz.zip


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk