|
Boost : |
From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2008-03-01 05:58:33
Larry Evans wrote:
> A long time ago, I had one and was intending *eventually* to add it to
> iostreams, but never got around to it. It's in:
>
> http://svn.boost.org/trac/boost/browser/sandbox-branches/cppljevans/boost/io/filters
Thank you. Al though google revealed some postings about
margin_ostream it failed to get me to the sources.
I am not sure however you noticed the difference to my implementation:
I am storing state _in_ the stream, i.e. in ios base member and thus
allowing
out << indent_in << "blah blah\n";
out << "still indented\n";
And a function
void foo(ostream& os)
that gets passed down my indent_filter'ed stream still knowns
the indentation status.
The margin_ostream implements indent operation only the stream object.
Does is also have manipulators?
Will margin_ostream also work when downcasted to a plain ostream?
-- _________________________________________ _ _ | Roland Schwarz |_)(_ | aka. speedsnail | \__) | mailto:roland.schwarz_at_[hidden] ________| http://www.blackspace.at
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk