Hi Gavin, hi everyone. I'm thinking about the concatenated input
stream concept off and on, and I'd like to ask for some help in
organizing a solution.
The easy part to me is figuring out how to manage a collection of
input doodads (be they streams, stream buffers, sources, or whatever)
and satisfy read requests by getting the requested characters from one
or more of them. I have some experience with C++ development (from
about 20+ years ago, so C++03 is, for better or worse, maybe more
familiar to me ...) and so I feel pretty comfortable with the whole
business about classes, constructors, methods, etc.
What I need is for someone to give me some advice about how to
organize the class declarations. Of which existing Boost class should
I be deriving from? What is the type of the underlying resources that
are to be marshalled?
To be a more concrete, here is a snippet of code which uses existing
Boost classes to open an input stream.
boost::iostreams::file_source fs ("foo.txt");
boost::iostreams::stream_buffer boost::iostreams::file_source sb (fs);
std::istream is (&sb);
Now I'd like to say something like
concatenated_source cs (<list of resources to be marshalled goes here>);
boost::iostreams::stream_buffer