Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] save/load split between 2 differentclasses
From: Robert Ramey (ramey_at_[hidden])
Date: 2009-04-10 02:36:26


Though it's hard to tell from you're description, you might want to take
a look at Reference>Serializable Concept->Serialization
Wrappers->BinaryObject

basically this is a "wrapper" which temporarily adds required information
for serialization to otherwise opaque buffers.

Robert Ramey

"Robert Dailey" <rcdailey_at_[hidden]> wrote in message
news:496954360904092221x5ba5554fyb181286bf760e7a_at_mail.gmail.com...
I've got a particular issue I cannot seem to find a solution to.

I'm using boost.serialization to deserialize audio data into an object that
wraps OpenAL. For example, the data I'm writing out would be (in order) a
single INT representing the size of the raw data and then the data buffer
after that. However, in my "Sound" object, I do not keep the data and length
information as state in the class. Instead, I just keep the OpenAL buffer
handle. In order for this class to be able to implement save(), it would
need to have extra state, which would not be appropriate. Basically, I need
to have a separate object dedicated to saving the sound data, and another
for loading it.

Is this possible? Perhaps there is a recommended design?

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net