|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-09-28 06:10:11
Vladimir Prus wrote:
> But failing that, what about adding the following macros:
>
> I_WANT_TO_USE_TYPEID_WHEN_SERIALIZING_DERIVED_CLASSES_OF(any_base)
>
> or
>
> USE_THE_FOLLOWING_FUNCTOR_TO_GET_GUI_FOR_CLASSES_DERIVED_FROM(any_base,
> serialization::typeid_guid_maker)
>
> ? At least that would make boost::any serializable.
I don't think it will make it DEserializable, though. You still need to map
the string to a type when loading, which requires that you have previously
registered the type. A boost::any is equivalent to a pointer to an abstract
class from serialization point of view.
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