|
Boost : |
From: Zach Laine (whatwasthataddress_at_[hidden])
Date: 2007-03-23 10:46:26
On 3/22/07, Robert Ramey <ramey_at_[hidden]> wrote:
> How about sending me the whole file. I don't have 1.33 on my machine
> and export.hpp is ALOT different in the HEAD branch where any changes
> would be made.
>
> Robert Ramey
>
> Zach Laine wrote:
> > On 3/15/07, Zach Laine <whatwasthataddress_at_[hidden]> wrote:
> >> I did something stupid with my serialization code. I blithely
> >> changed the names of several polymorphic classes everywhere they
> >> appeared in the code, since they had moved out of a class into that
> >> class's namespace (e.g. SomeNS::View::Primitive became
> >> SomeNS::Primitive). Several months later, I discovered that I could
> >> no longer read old binary archives, because I was using
> >> Boost.Serialization's BOOST_CLASS_EXPORT() macro, and this macro was
> >> now registering the Primtive type with the name-string "Primitive",
> >> instead of "View::Primitive", which is how it was saved in the
> >> oldest archives.
> >>
> >> Since there is a 1-1 mapping between name-strings and types, and
> >> since most of the Serialization code uses static/global data, I
> >> cannot currently support both the archives saved with and the
> >> archives saved without the "View::" in the same program.
> >>
> >> Since I suspect this is not the first time someone has done this, nor
> >> the last time someone will do so, is there a way to fix this using
> >> the current library? If not, would it be technically possible to
> >> add a BOOST_CLASS_EXPORT_ALIAS() macro, or some such? If it is
> >> possible, I'm willing to supply the implementation.
> >>
> >> Zach Laine
> >>
> >
> > Robert, is there any kind of verdict on the alias patch? I'd like to
> > finish this topic before the thread gets too stale.
> >
> > Zach Laine
> > _______________________________________________
> > Unsubscribe & other changes:
> > http://lists.boost.org/mailman/listinfo.cgi/boost
>
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
The patch is actually against 5 files, so I'm leaving it as a patch.
This time the patch is against HEAD. Find the patch and test program
attached.
Zach Laine
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk