Boost logo

Boost Users :

From: Gary Granger (granger_at_[hidden])
Date: 2007-04-24 14:02:16


Hi Frank,

You're very welcome, I'm glad it helps.

The defines are for exports of polymorphic derived types through base
pointers. Here are the docs on exporting:

http://www.boost.org/libs/serialization/doc/serialization.html#registration

The export defines in boost/serialization/export.hpp use a set of known
archive types defined in boost/archive/detail/known_archive_types.hpp,
so the defines I added are supposed to include my custom archive in that
list of known archive types.

I finally found the place in the boost documentation where I learned
about the custom archive defines in the first place:

http://www.boost.org/libs/serialization/doc/archive_reference.html#implementation

My code does not build without the defines, as I use the export defines
to register polymorphic types in lots of places, and so that I don't
have to include the template implementations everywhere. Also, it seems
more correct and complete to define them, so I'm trying to be safe and
avoid any erratic or unexpected behavior. I have had some bad
experiences with the serialization library and things like header order
causing unexplainable errors. I don't yet understand all the magic
behind it. :)

Hope that helps,
gary

Frank Bergemann wrote:
>
> Just a final question:
> Could you tell me, what these defines are about?
> I didn't adopt them and the modules seems to be ok without.
>
> >
> > #define BOOST_ARCHIVE_CUSTOM_IARCHIVE_TYPES datastore::ConfigIArchive
> > #define BOOST_ARCHIVE_CUSTOM_OARCHIVE_TYPES datastore::ConfigOArchive
> >


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