[Serialization] a newbie question about retrieving objects serialized through base class pointers
Hi all, I'm trying to reuse XML archives for some purpose. I'm serializing an array of pointers to a base class (let's call it A) containing pointers to derived classes (let's call them B and C). I'm wondering how does Boost distinguish between class types (A, B and C)when deserializing from the XML archive? (Is there any information in the XML archive or elsewhere giving the class name of the serialized object?) Regards Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)
If BOOST_CLASS_EXPORT is used, the class name is included as an attribute in
the xml file.
Otherwise, the class_id variable - another xml attribute is used. This is
set/recovered by the
"registration" process.
Each way of doing this bookkeeping has its disadvantages and advantages.
Read the documentation
for further details.
Robert Ramey
"t.sammoud"
participants (2)
-
Robert Ramey
-
t.sammoud