|
Boost-Build : |
Subject: Re: [Boost-build] Boost serialization API changes
From: Ven Tadipatri (ven.tadipatri_at_[hidden])
Date: 2011-01-16 08:50:37
I'm looking at the documentation in
http://www.boost.org/doc/libs/1_45_0/libs/serialization/doc/index.html
and I'm not sure where the change to BOOST_CLASS_EXPORT is specified. Is
there some other documentation I should be looking at? Also, the
serialization code we currently have (which works with Boost 1.38) looks
like this. Are there changes that need to be made for Boost 1.45?
Thanks,
Ven
friend class boost::serialization::access;
template <class Archive>
void save (Archive & ar, const unsigned int version) const {
// invoke base class serialization
ar << boost::serialization::base_object<const
ns::BaseDataObject>(*this);
ar << myDataSize;
ofs::Int8 * byteIter = (ofs::Int8*) myBytePtr;
for (int i = 0; i < myDataSize; ++i) {
ar << *(byteIter++);
}
}
template <class Archive>
void load (Archive & ar, const unsigned int version) {
// invoke base class serialization
ar >>
boost::serialization::base_object<ns::BaseDataObject>(*this);
ar >> myDataSize;
myBuffer = (ofs::Int8 *) malloc (myDataSize);
if (myBuffer != NULL) {
ofs::Int8 * byteIter = myBuffer;
for (int i = 0; i < myDataSize; ++i) {
ar >> *(byteIter++);
}
myBytePtr = reinterpret_cast<void const *> (myBuffer);
}
else {
myBytePtr = NULL;
}
}
BOOST_SERIALIZATION_SPLIT_MEMBER()
On 01/15/2011 03:44 PM, Robert Ramey wrote:
> Ven Tadipatri wrote:
> ...
>
> Note that the lastest boost version has refined and clarified for ...EXPORT.
> This is explained in the documentation for the most recent package.
>
> Robert Ramey
>
>
>
> _______________________________________________
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk