id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 809,Deriving Serialization classes,gorogoro,Robert Ramey,"{{{ Hello! I don't now why, but the mailing list is deniying my mails :S. Isn't there an example on how to derive the text_oarchive_impl like the demo_fast_binary_archive.cpp? And another for the XML archives? Because I'm trying to derive it and I was sucessfull with the binary archives, but I'm getting troubles with the other ones :S. a) But I'm deriving it from text_archive_imp b) what? I didn't understand.. As I said the binary serialization is working fine c) Onde again what do you mean?? How can I derivate the serialization classes?? I've tried the following code to, but with the same error: class TextArchiveO : public IArchive, // don't derive from text_oarchive !!! public boost::archive::text_oarchive_impl { public: TextArchiveO(std::ostream & os, unsigned flags = 0) : boost::archive::text_oarchive_impl(os, flags) {} ~TextArchiveO(){} virtual void Serialize(int& t) { *this & BOOST_SERIALIZATION_NVP(t); } virtual void Serialize(bool& t) { *this & BOOST_SERIALIZATION_NVP(t); } }; class TextArchiveI : public IArchive, // don't derive from text_oarchive !!! public boost::archive::text_iarchive_impl { public: TextArchiveI(std::istream & is, unsigned flags = 0) : boost::archive::text_iarchive_impl(is,flags) {} ~TextArchiveI(){} virtual void Serialize(int& t) { *this & BOOST_SERIALIZATION_NVP(t); } virtual void Serialize(bool& t) { *this & BOOST_SERIALIZATION_NVP(t); } }; On 1/10/07, Robert Ramey wrote: - Hide quoted text - a) try deriving from text_?archive_impl rather than IArray b) If you're going to put your own archive in a separate file - make sure you find a way to explicitly instantiat it. See text_oarchive.cpp in the library. c) I wouldn't recommend using the HEAD branch for ""real"" code since this is altered from time to time. Robert Ramey _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users }}}",Support Requests,closed,,None,None,,None,,