Boost logo

Boost :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2003-06-09 18:10:01


Robert Ramey wrote:
> In the course of my work I had occasion to make a small family
> of iterator adaptors for escaping/unescaping ascii text, and things
> like that. I made the constuction interface so it could use
> another iterator adaptor as a "source" thereby permiting me
> to compose iterators in any sequence (sort of like unix pipes).
> If there is any interest I will post this.

Please do. I, or you, could see if the marg_ostreambuf code could
be modified to do what you want.

>
> Subsequently, I had the need to output unicode as UTF-8 which
> is char based rather than wchar_t based. I used the code
> in the vault by Ron Garcia. This implemented code_cvt facet
> to do the transformation.

I should look at the Garcia code, meanwhile...

>
> It was irksome to me that that the interface for code_cvt facet
> was not mapable to my iterator adaptor set - or is it. Now that
> I have invest the effort to understand stream/streambuf/facet/local/char vs wchar_t/
> charsets/etc. I wonder if one can't make a code_cvt facet
> that would be constructed with an arbitray iterator adaptor.

I've created files/col_io/pipe.cpp with output in pipe.exe.output. It
demonstrates that two marg_ostreams can be composed. The 1st one
changes the margin and at some time puts "xxx" in that margin. The 2nd
just puts "yyy" in the margin.


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