Boost logo

Boost Users :

From: Merrill Cornish (merrill.cornish_at_[hidden])
Date: 2005-12-19 10:03:11


Robert,

I need to serialize ptime class instances. As far as I can tell,
the ptime class isn't covered yet by serialization. However,
if I understand how things work, I believe I can do it myself
using split member.

In the save() function, I would convert my ptime instance into
a string, which I then serialize as a string. In the load() function,
I would retrieve the string and construct another ptime instance.

The other members of the class being serialized would be
handled by the usual

    ar & <member_name>;

with the appropriate NVP wrapper, since I'm using XML archives.

Is that how I should do it?

Merrill


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