28 Sep
2005
28 Sep
'05
11:10 a.m.
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.