Boost serialization library

Discussion in 'C++' started by eyal.susser@gmail.com, May 3, 2005.

  1. Guest

    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...

    Thanks,

    Eyal.
     
    , May 3, 2005
    #1
    1. Advertising

  2. Jeff Flinn Guest

    <> wrote in message
    news:...
    > 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::eek:stringstream 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
     
    Jeff Flinn, May 3, 2005
    #2
    1. Advertising

  3. Guest

    Well, fome the looks of it, std::stringstream does the trick. I'll run
    some more checks to be sure...anyway, thanks! I'm a bit embarrased to
    admit I didn't know there was such a thing a stringstream...
     
    , May 3, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    2,291
    deadsea
    Jan 2, 2005
  2. Replies:
    3
    Views:
    1,068
  3. Dimitri Ognibene
    Replies:
    4
    Views:
    807
    Dimitri Ognibene
    Sep 2, 2006
  4. =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki

    The boost.variant library and boost::make_recursive_variant

    =?ISO-8859-2?Q?Miros=B3aw?= Makowiecki, Jul 5, 2007, in forum: C++
    Replies:
    1
    Views:
    725
    dasjotre
    Jul 6, 2007
  5. Ramunas Urbonas
    Replies:
    1
    Views:
    420
    Dino Chiesa [Microsoft]
    Jul 27, 2004
Loading...

Share This Page