
I don't know the serialization lib in such details. All I know is that
the code works. But you need the virtual foo() function in the class
declaration and you need to have the BOOST_CLASS_EXPORT macros.
Christian
On 2/6/07, Aljaz
Hello.. I have a derived class serialization: for instance:
class client_request_base { public: client_request_base() : _type( 0 ) {} private: friend boost::serialization::access; template< class ARCHIVE > void serialize( ARCHIVE& ar, const unsigned int version ) { ar & _type; } unsigned int _type; };
class calc_skip_images_request : public client_request_base { public: calc_skip_images_request() : client_request_base( 1 ), _images_client( 0 ) {} private: friend boost::serialization::access; template< class ARCHIVE > void serialize( ARCHIVE& ar, const unsigned int version ) { ar & boost::serialization::base_object
( *this ); ar & _images_client; } unsigned int _images_client; }; Now I wonder.. If I want to use serialization do I have do EXPORT second class? Or set first class to abstract? Like:
BOOST_IS_ABSTRACT( client_request_base ) BOOST_CLASS_EXPORT(calc_skip_images_request)
Im confused which of these two things is needed? When should I use export and when is abstract macro?
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users