Boost logo

Boost Users :

Subject: Re: [Boost-users] Serialized object's constructor calling question
From: Jari (jaristr_at_[hidden])
Date: 2011-05-10 23:31:45


On Wed, May 11, 2011 at 12:10 AM, Jari <jaristr_at_[hidden]> wrote:
> Hi,
> how do you make boost serialization call other constructor of your
> classes than the default constructor without arguments? Is this
> possible?
>
> The reason i need to do this is because the class being serialized
> also has reference that needs to be initialized at constructor.
>
> thx
>

I found that you need to use load_construct_data for this. But i have
around 20 classes , do i need load_construct_data for each of them?

If i could just use one function for all it would be great , as they
are derived from same base class and have same kind of constructor.
.
does anybody know?

thx


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