Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-12-27 21:18:18


The best would be to write a small test that fails and send it to me.

Robert Ramey

Merrill Cornish wrote:
> Robert,
>
> I changed the archive output from XML to text. The example I sent you
> prevously ran to completion without error. However, the text format
> doesn't have enough syntax detail to make a syntax error obvious. The
> text archive it generated was
>
> 22 serialization::archive 3 0 1 1 1 0
> 0 0 0 0 1 -1 4 abcd 0 0 0 0 8 20051227 0 0 0 18 41 40 0
>
> I had also written a serialization test for another class. Its
> serialize() function looks like this
>
> private:
> friend class boost::serialization::access;
> template<class Archive>
> void serialize(Archive& ar, const unsigned int version) {
> ar & BOOST_SERIALIZATION_NVP(mNode);
> ar & BOOST_SERIALIZATION_NVP(mInputIndex);
> ar & BOOST_SERIALIZATION_NVP(mIsInbound);
> }//serialize()
>
> where, again, mNode is a shared_ptr, mInputIndex is size_t,
> and mIsInbound is a bool. The code to generate the archive
> and to then read is back is as I showed you before. The
> archive generated was
>
> 22 serialization::archive 3 0 1 1 1 0
> 0 0 1
>
> Is that enough of an archive to record the serialize()
> function above? The serialization of the mNode data
> member should have included the value 1142 in it, but I
> see nothing that would represent that.
>
> 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