Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization - newbie] serializing/deserializing singleton class objects
From: Rune Lund Olesen (rune.olesen_at_[hidden])
Date: 2009-08-13 12:38:35


I think there is some special considerations to be taken when serializing
base classes if you haven't already taken that into account. I also would
suggest you post some minimalistic example. Take a look at this:

http://www.boost.org/doc/libs/1_39_0/libs/serialization/doc/serialization.html#base

http://www.boost.org/doc/libs/1_39_0/libs/serialization/doc/serialization.html#runtimecasting

Cheers

Rune

On Thu, Aug 13, 2009 at 8:51 AM, Rutger ter Borg <rutger_at_[hidden]> wrote:

> Soumen wrote:
>
> > Though this is ensured in my code, could you point me to this in the doc?
> >
> > BTW, I just put some cout in serialize() function of A, B, C and D to
> > verify if
> > serialize is getting called or not for all of these classes. And
> strangely
> > I see,
> > serialize() is getting called only for D. Not for A, B or C. I'm not
> > getting any
> > exception either. Assuming member of type vector<A*> in D is data_, in my
> > D::serialize() I just do
> >
> > ar & data_;
> >
> > I'm already including vector.hpp. Am I missing something?
> >
>
> Exporting is discussed at
>
> Reference/Serializable Concept/Export
> Reference/Special Considerations/Exporting Class Serialization
>
> the note on order of includes is in the second one. There's more
> information
> on the type registry at
>
> Other Classes/extended_type_info
>
> Something like the php-docs have with comments and stuff would be nice for
> serialization.
>
> Do you have a (slimmed down) example of your code?
>
> Cheers,
>
> Rutger
>
>
>
>
> _______________________________________________
> 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