Boost logo

Boost :

From: Augustus Saunders (infinite_8_monkey_at_[hidden])
Date: 2002-12-12 22:35:14


Most of this has probably been said before, but I wanted to make a
concise summary. I have a couple of questions and my views on them:

1) What does a Serialization library do (or make easier) that you
can't do by yourself with iostreams?

Me: Basic usages of MFC's serialization system can be recreated with
iostreams. There's no need for any serialization library for this
usage. What additional services can we provide?

A) Help with serializing pointers. If you want to serialize multiple
pointers which may refer to the same object, it would be nice to have
some authoritative implementations. Significantly, language gurus
found in the boost community can help with the object layout and
dynamically allocated array issues. Figuring out if p1 and p2 point
to the same object even if p1 != p2 or typeid(p1) != typeid(p2) can
be quite bewilidering. There can potentially be several different
schemes for where (and how) to store aliased objects, depending on
whether you can back up in a stream, for example.

B) Help for serializing pointers to polymorphic types. This problem
has its own ins and outs, not to be confused with A. There's a few
parts to it: figuring out the type of the object, assigning some kind
of type identifier that can be included in the stream, and providing
a factory that can reconstruct objects given the type identifier and
the serial object data. Again, there are likely several different
schemes for how this could be done. Several people asked that Robert
break this part of his library out for seperate submission.

C) Provide hooks for common format styles. Different format styles
may include different types of metadata. Gathering this metadata
could be nontrivial, so it would be nice to help out with that.
Establishing common styles so that convenient hooks are provided will
make exporting to those style formats much easier.

D) Help with the M*N problem. If you have M classes and N formats,
can we make increasing or decreasing M and N any easier? Can we make
them easier to maintain?

2) Is there anything useful that a generic library can hope to do
when class or archive versions change besides throwing an error when
versions don't match?

Me: I'm not sure what kind of generic versioning we can provide.
What benefit do we provide over the application author
serializing/deserializing his or her own version? I can see a useful
prospect of automatic versioning in Debug mode, but I'm not clear on
other uses.

Cheers-
Augustus

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk