Serialized object's constructor calling question

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

On Wed, May 11, 2011 at 12:10 AM, Jari
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

Jari wrote:
On Wed, May 11, 2011 at 12:10 AM, Jari
wrote: 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.
But not the same constructor.
. does anybody know?
I don't know Robert Ramey
thx
participants (2)
-
Jari
-
Robert Ramey