<ey*********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
Hi,
I'm using the Boost serialization library. Iwant to serialize
classes into simple buffers on RAM. There doesn't seem to be a
suitable archiver. Am I missing it? The ones I saw were for files
only. Although implementing one is easy, I would like to have one that
has already been tested...
Your best bet is to join the boost mailing list(s) at
www.boost.org. In the
meantime, archives are independent of the particular stream type. You pass a
reference to the desired stream type when you construct an instance of an
archive.
std::ostringstream lOut;
boost::archive::xml_oarchive oa( lOut );
or
boost::archive::text_oarchive oa( lOut );
or
boost::archive::binary_oarchive oa( lOut );
If these don't meet your needs, You can use Jonathan Turkanis' IOstream
library to easily wrap other storage/transmission methods. This is/soon to
be part of boost. For example, I've used it to wrap the MS Windows clipboard
to support copy/paste and drag/drop.
Jeff Flinn