Boost C++ Libraries: Ticket #809: Deriving Serialization classes https://svn.boost.org/trac10/ticket/809 <pre class="wiki">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&lt;TextArchiveO&gt; { public: TextArchiveO(std::ostream &amp; os, unsigned flags = 0) : boost::archive::text_oarchive_impl&lt;TextArchiveO&gt;(os, flags) {} ~TextArchiveO(){} virtual void Serialize(int&amp; t) { *this &amp; BOOST_SERIALIZATION_NVP(t); } virtual void Serialize(bool&amp; t) { *this &amp; BOOST_SERIALIZATION_NVP(t); } }; class TextArchiveI : public IArchive, // don't derive from text_oarchive !!! public boost::archive::text_iarchive_impl&lt;TextArchiveI&gt; { public: TextArchiveI(std::istream &amp; is, unsigned flags = 0) : boost::archive::text_iarchive_impl&lt;TextArchiveI&gt;(is,flags) {} ~TextArchiveI(){} virtual void Serialize(int&amp; t) { *this &amp; BOOST_SERIALIZATION_NVP(t); } virtual void Serialize(bool&amp; t) { *this &amp; BOOST_SERIALIZATION_NVP(t); } }; On 1/10/07, Robert Ramey &lt;ramey@rrsd.com&gt; 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 </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/809 Trac 1.4.3 Robert Ramey Wed, 17 Jan 2007 19:10:56 GMT <link>https://svn.boost.org/trac10/ticket/809#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/809#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=396141 Originator: NO usage question dealt with on boost user mailing list </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 17 Jan 2007 19:10:57 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/809#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/809#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=396141 Originator: NO Thank you for submitting a Boost tech support request. &lt;BR&gt;*** At this time, tech support requests to this SourceForge tracker are monitored at best sporadically. A more reliable way to get answers is to post to the boost mailing list at &lt;a href="http://groups.yahoo.com/group/boost"&gt;http://groups.yahoo.co m/group/boost&lt;/a&gt;. Although the maintainers of Boost libraries try to respond to questions in a timely fashion, we offer no guarantee of service, express or implied. *** </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 17 Jan 2007 19:10:58 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/809#comment:3 https://svn.boost.org/trac10/ticket/809#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket