Boost logo

Boost :

From: Daryle Walker (dwalker07_at_[hidden])
Date: 2003-04-23 03:18:51


On Tuesday, April 22, 2003, at 1:24 PM, Reece Dunn wrote:

>> Hi Reece,
>> I looked at it.
>> I do like your solution better. Did you submit it for a formal review?
>
> Not yet. How do I go about doing this?
>
>> However, what do you think of my proposal?
>
> I have not had chance to look at it yet. I am also interested in
> logging/tracing libraries and have used my indentation code in a basic
> trace
> facility of my own.
>
>> What I want is something as transparent as possible, since usually
>> streams
>> are passed as std::ostream& arguments.
>
> My code does not allow for you to pass a std::ostream & to the
> constructor,
> using something like:
>
> // will *not* work
> boost::indentor< std::ostream > ind( os );
>
> In order to get this to work, I would need to add a constructor to
> indentor
> that will accept a reference to a std::ostream, or std::basic_stream
> and
> pass that to the parent class.
>
> It would also need a stream wrapper class, one that takes a stream
> reference
> and provides a stream-like interface to it.
>
> Then, you could do something like:
>
> boost::indentor
> <
> boost::ostream_wrapper< std::ostream >
>> ind( os ); // not supported yet
>
> Is there a set of classes of the form
> [i/o/io]stream_wrapper
> available in boost?
>
I just had some classes that wrap a streambuf into a stream reviewed.
(I'm still working on the issues brought up in that review).

This reminds me: you guys are taking the approach of modifying streams;
is that a good idea? I seen a similar class (by Dietmar Kuehl) that
worked on the stream-buffer level. The stream classes aren't that
customizable, but the stream-buffer classes are.

Daryle


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