Boost logo

Boost :

From: Daryle Walker (dwalker07_at_[hidden])
Date: 2003-07-25 03:03:27


On Tuesday, July 22, 2003, at 8:51 AM, Paul A. Bristow wrote:

>> -----Original Message-----
>> From: boost-bounces_at_[hidden]
>> [mailto:boost-bounces_at_[hidden]] On Behalf Of Daryle Walker
>> Sent: Saturday, July 19, 2003 8:38 AM
>> To: Boost
>> Subject: [boost] Slight revision to more-I/O
>>
>> In the latest post-review version, I fully disabled copying for the
>> array-based stream-buffer class. I also copied the revised version
>> of the library to
>> http://groups.yahoo.com/group/boost/files/more_io_revised.zip
>
> The iostate saving and iomanip seem fine, but I am left uncertain on
> how to use the stream buffer class in practice. More user-oriented
> documentation, tests and examples would be helpful. (And also there
> seem to be differing, perhaps competing, perhaps conflicting,
> offerings in filtering/decorating stream buffers).

You've looked at the revised version, right? (A lot of the changes
between the original and revised versions were based on previous
reviews, so I don't want to answer questions on the first version if it
was already fixed in the second. Note that changes that would have
involved greatly changing the API weren't/won't-be done.)

The State-saving I/O stuff has already gone in; it was reviewed over a
year ago. (I don't know why almost everyone is thinking it's being
re-reviewed?) The I/O manipulator is part of this review.

Which stream-buffer class are you talking about, array-wrappers or the
stream-wrapping helpers? The stream-wrapping helpers are just that;
you would define your own stream-buffer class then semi-automate the
corresponding stream classes with the helper classes. You'll have to
manually write the constructors and forwarding functions yourself since
they're open-ended. The docs for the stream-wrappings now has a long
example that also includes alternate techniques. The array-wrappers
are also example of the wrapping technique. Those array-wrappers can
be used to help limit the amount of dynamic storage in a program (since
it doesn't use any).

I checked out some of the filtering/decorating stuff; they have nothing
to do with the stuff in this review, in terms of main features.
However, the stream adaptations of the filtering stream-buffers use a
manual version of the stream-wrapping technique. It looks like there
is a case to encapsulate this idiom with actual helper classes (since
I'm not the only one using it).

Daryle


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