Boost logo

Boost Users :

From: Drumheller, Michael (michael.drumheller_at_[hidden])
Date: 2005-12-06 11:58:11


>> From: David Abrahams <dave <at> boost-consulting.com>
>> Subject: Re: Boost.python serialization
>> Newsgroups: gmane.comp.lib.boost.user
>> Date: 2005-11-29 23:28:17 GMT (6 days, 17 hours and 9 minutes ago)
>>
>> "Drumheller, Michael" <michael.drumheller <at> boeing.com> writes:
>>
>> > Thank you for the help. I have seen that link (the one you
supplied)
>> > before, but I posted my question because that link in particular
does
>> > not mention the words "Boost.Serialization" or "Archive" at all.
>>
>> That's because the Boost Serialization library is unrelated.

I understand that it is technically unrelated. I am asking for
information about about patterns of actual usage.

>> > I suppose what I was really getting at, and was probably not very
>> > clear about (sorry :| ) was whether the specific approach (by
>> > N. Becker) of using a stringstream wrapped with a
>> > boost::archive::binary_oarchive is a standard idiom.
>>
>> "Standard?"

OK: "common," "popular," "preferred," "regarded-as-best-practice,"
"effective."

>> > (Basically, I would have thought that "python pickle
boost::archive"
>> > would be a million-hit Google query, but it's only about a dozen.
I
>> > find that weird. Do people just not serialize their C++
extensions
>> > very often?)
>>
>> Yes, they do it very often. There's usually no need to touch
>> Boost.Serialization in order to do so, though.

My extensions refer to one another, i.e., they form a significant object
hierarchy in and of themselves. E.g., on the C++ side I might have an
instance x of class X, which contains a vector of shared_ptrs p1,...,pn
to instances y1,...,yn of another C++ class Y. At pickle-time there may
be Python object z with a member u bound to to x and members w1,...,wm
bound to a subset of the y1,...,yn. Is it even feasible to expect to be
able to simple pickle.dump z and have it all work?

Please keep in mind: I am just getting started wading into serializing
a pretty complicated set of strongly interdependent Python and C++
objects and I am just trying to get my bearings. If this is the wrong
forum to be asking these questions, please tell me.
 
MD

>> --
>> Dave Abrahams
>> Boost Consulting
>> www.boost-consulting.com


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