Boost logo

Boost Users :

Subject: [Boost-users] [serialization] boost::system::error_category
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2009-08-07 08:56:05


Dear list,

I'm trying to write serialization code for Boost.System's error_codes,
however I'm having trouble to serialize/deserialize an error_category, which
are polymorphic singleton objects.

I guess when saving, type information needs to be stored, like with
polymorphic pointers? When loading, a global function
(get_generic_category(), get_system_category(), etc.) could be used to
obtain a reference to the singleton object. Is there any way to use the
exported type information in such way that a reference to the correct
singleton is obtained?

Any suggestions on how to approach this?

Thanks in advance,
Kind regards,

Rutger ter Borg


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