Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-05-30 21:44:45


Rather than what you have below - just try

BOOST_SERIALIZATION_SPLIT_FREE(creaturesImage);

By default - pointers to primitive types aren't serializable. I'm not
sure why you used the BOOST_CLASS_IMP.. below but it
would seem to me in appropriate in your case. If you do this
you will be able to do;

const creaturesImage *pci;
...
ar << pci;

...
creaturesImage *new_pci;
ar >> new_pci

assert(*pci == *new_pci);

In fact, given the size of your application, making a little program
like the above to test your serialization code separately, is
probably a good idea anyway.

Good Luck

Robert Ramey

Bryan Donlan wrote:
> Hi all,
>
>
> BOOST_SERIALIZATION_SPLIT_FREE(creaturesImage *);
> BOOST_CLASS_IMPLEMENTATION(creaturesImage *,
> boost::serialization::primitive_type);


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