Boost logo

Boost Users :

From: David Klein (dave_chp_at_[hidden])
Date: 2007-02-09 10:48:09


Mark Wyszomierski wrote:
> Hi,
> I'm using the boost serialization methods, they're great. I'm using
> some 3rd party classes that I don't have access to, so I can't add a
> serialize() member function to them. It's something like:
>
> class CMyClass {
> int m_nWhatever;
> CSomeClass m_sc; // I am just using this from someone else's library....
>
> void serialize(Archive &ar, const unsigned int version)
> {
> ar & version;
> ar & m_nWhatever;
> ar & m_sc; // fails!!!
> }
> }
>
> how can I get around this?
>
> Thanks,
> Mark
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
Hi Mark,

you don't necessarily need a member function. see f.ex:

http://boost.org/libs/serialization/doc/tutorial.html#nonintrusiveversion

--
HTH dave

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