|
Boost Users : |
From: Miguel Silvestre (msilvestre_at_[hidden])
Date: 2007-01-11 06:58:37
????
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<TextArchiveO>
{
public:
TextArchiveO(std::ostream & os, unsigned flags = 0) :
boost::archive::text_oarchive_impl<TextArchiveO>(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<TextArchiveI>
{
public:
TextArchiveI(std::istream & is, unsigned flags = 0) :
boost::archive::text_iarchive_impl<TextArchiveI>(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 <ramey_at_[hidden]> wrote:
>
>
>
> 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_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
-- Miguel Silvestre -- Miguel Silvestre
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net