Boost logo

Boost :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2003-06-09 13:16:23

Larry Evans wrote:
> I hadn't thought of the "adaptable sequence" idea, but the "composition
> of streambufs" idea sounds similar to the marg_ostreambuf in
> files/col_io. The marg_ostreambuf::CTOR takes a streambuf and its
> member functions forward to that after doing some processing via the
> marg_buffer_put superclass. Maybe marg_buffer_put is a "sort-of"
> "adaptable sequence". Anyway, it might give you some ideas.

Maybe a modification to double_streambuf or bi_directional_streambuf
could be used simlar to pipes in unix. Another template parameter, e.g.
one named "Xform", would contain the code to do any transformations on
the characters. For example, if Xform=marg_buffer_put, then this would
create marg_ostreambuf. This could be the input stream to another
such buffer, thus forming the next link in the pipe of streambufs.

Does this make sense?

Boost list run by bdawes at, gregod at, cpdaniel at, john at