[serialization] My archive class + BOOST_CLASS_EXPORT

I have my own archive class (derived from binary_oarchive_impl). And I have a base abstract class and derived classes(non-abstract). I use BOOST_CLASS_EXPORT macro to register my derived classes. But it seems the macro works only for Boost archives, not for user defined archives. Is there any way to register derived classes to get the same functionality that BOOST_CLASS_EXPORT provides?

Look for "boost/archive/detail/known_archive_types.hpp" and edit this file to include your new archive class. Robert Ramey Denis Kuznetsov wrote:
I have my own archive class (derived from binary_oarchive_impl). And I have a base abstract class and derived classes(non-abstract). I use BOOST_CLASS_EXPORT macro to register my derived classes. But it seems the macro works only for Boost archives, not for user defined archives. Is there any way to register derived classes to get the same functionality that BOOST_CLASS_EXPORT provides?

At 1:36 PM -0700 4/30/06, Robert Ramey wrote:
Denis Kuznetsov wrote:
I have my own archive class (derived from binary_oarchive_impl). And I have a base abstract class and derived classes(non-abstract). I use BOOST_CLASS_EXPORT macro to register my derived classes. But it seems the macro works only for Boost archives, not for user defined archives. Is there any way to register derived classes to get the same functionality that BOOST_CLASS_EXPORT provides?
Look for "boost/archive/detail/known_archive_types.hpp" and edit this file to include your new archive class.
Robert Ramey
Isn't this situation what BOOST_ARCHIVE_CUSTOM_[I,O]ARCHIVE_TYPES is for?

Yes it is. I couldn't find it in the manual when I looked for it. Thanks Robert Ramey Kim Barrett wrote:
At 1:36 PM -0700 4/30/06, Robert Ramey wrote:
Denis Kuznetsov wrote:
I have my own archive class (derived from binary_oarchive_impl). And I have a base abstract class and derived classes(non-abstract). I use BOOST_CLASS_EXPORT macro to register my derived classes. But it seems the macro works only for Boost archives, not for user defined archives. Is there any way to register derived classes to get the same functionality that BOOST_CLASS_EXPORT provides?
Look for "boost/archive/detail/known_archive_types.hpp" and edit this file to include your new archive class.
Robert Ramey
Isn't this situation what BOOST_ARCHIVE_CUSTOM_[I,O]ARCHIVE_TYPES is for?
participants (3)
-
Denis Kuznetsov
-
Kim Barrett
-
Robert Ramey