|
Boost : |
From: Reece Dunn (msclrhd_at_[hidden])
Date: 2003-04-22 07:24:31
>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?
Regards,
-rhd-
_________________________________________________________________
Overloaded with spam? With MSN 8, you can filter it out
http://join.msn.com/?page=features/junkmail&pgmarket=en-gb&XAPID=32&DI=1059
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk