iostream - chaining c++ streams -
I was thinking about "chaining" of two C ++ iostreams to filter the input twice, I zlib compressed to
I am using gzstreams to read files and I was thinking of coding a stream that reads from a stream and encoding converts. Possibly by passing an open stream as constructor parameter ... How do you feel that it can be done best?
I have not used it, but can be helpful in promoting.
With an example I found, which applies an output filter that indents output:
boost :: iostreams:: filtering_stream out; Indent_filter :: push (out, 2); Out.push (std :: court); and use it like this:
outside < & Lt; "Hello filter! \ N" & lt; & Lt; Indent_in & lt; & Lt; "This is \ n" & lt; & Lt; "Indent \ n" & lt; & Lt; Indent_out & lt; & Lt; "Even \ n"; The resulting output will be:
Hello filter! It is indented as
Comments
Post a Comment