Jeff Flinn
Piyush, Could you post in plain text please. It's difficult to avoid top positing otherwise.
I could not find any documents for Reference >> Pointers >> Pointers to Objects of Derived Classes ?? Can you please send html link, thanks http://www.boost.org/libs/serialization/doc/index.html Will get you to the serialization docs. This looks like it changed since I first responded. There is a tree on the left side. Expand Reference >> Serializable Concept >> Pointers >> Pointers to Objects of Derived Classes to get to the pertinent section. The html organization and/or
Internet
Explorer are not allowing me to easily get you a more detailed link. Jeff Flinn
_______________________________________________ Boost-users mailing list Boost-users <at> lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Piyush I have had the same problem using a polymorphic collection of boost shared pointers. The collection contains (boost shared) pointers to the abstract base class which point to derived concrete classes. I use boost version 1.32 and MSVC version 7. At first I included the macro BOOST_CLASS_EXPORT_GUID for each derived concrete class. Tracing through with the debugger, I saw that although the derived concrete class was being serialized, an unregistered class exception was being thrown subsequently when boost tried to serialize the reference count part of the shared pointer itself. This is a structure which, it turns out, also needs to be registered. The solution was to use the macro BOOST_SHARED_POINTER_EXPORT instead of the previous macro. This correctly serializes both the object and the shared pointer to the object. I hope this helps you. Regards Alan Afif