Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] transparently treating a class like abuilt-in type
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-07-28 01:10:36

> I'm not sure I described things well enough. Say I have the
> following:
> typedef float Real;
> typedef Vector3<Real> Vector;
> and I have some xml archives containing serialized Vector objects that
> look like this:
> <x>-0.70032406</x>
> <y>-0.65001774</y>
> <z>0.29499683</z>
> Now, I won't be able to read in this archive if I change the Real
> typedef like so:
> typedef FixedPointClass Real;
> Even if I make FixedPointClass serializable, the data would need to
> contain an additional name-value pair for it to be readable, like so:
> <x><value>-0.70032406</value></x>
> <y><value>-0.65001774</value></y>
> <z><value>0.29499683</value></z>

Have you looked at the documentatoin regarding versioning?

Does that not help?

Robert Ramey

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at