Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-06-26 13:16:37


Just hand roll your own. Look at vector serialization to see how that
works.
Then just allocate the required space and loop through.

Basically, just re-implement the code in vector serialization using
a dynamically allocated array.

Robert Ramey

michalurbanski wrote:
> Thanks for the reply.
>
> Is there any way to make it work if I want to allocate a block of
> memory which size depends on the other serialized elements?
>
> For example, how do I deserialize an object with attribues
> constructed like this:
>
> Test(int a, int b) {
> this->a = a;
> this->b = b;
> this->c = new float[a*b];
> }

Robert Ramey


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