Boost logo

Boost Users :

From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2007-08-19 19:04:11


Hi!

Dominick Layfield schrieb:
> What on earth does it actually
> mean to serialize a pointer? And why would I want to do such a thing, anyway?

I use the serialization of "pointers" in one of my apps: I have a class
hierachy where some classes are "containers" and store "shared_ptr"s to
a set of objects (base class pointers, runtime polymorphism). This
builds up a object hierachy at runtime. Apart from that there is a map
which references some of these objects in the hierachy.

If there wasn't object tracking, I'd be lost with determinig the actual
runtime type of objects and the restauration of multiple pointers to the
same object.

In my opinion if you do not know what serializing a pointer in boost
means then you have not carefully read the tutorial. See
http://www.boost.org/libs/serialization/doc/tutorial.html#pointers for
details. Of course this does not clear the general point "what are
sensible semantics for serialization of pointer?", but I like the boost
solution in this regard.

Best Regards,
Frank


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