Boost logo

Boost Users :

Subject: [Boost-users] [Boost.Serialization] Serializing "abstract" classes
From: Júlio Hoffimann (julio.hoffimann_at_[hidden])
Date: 2011-08-05 12:29:40


Dear all,

I'm using Boost 1.45...

I've read Boost.Serialization docs so many times and can't understand why my
testcase is not working as expected. According to the following three links,
we need to address serialization of derived classes with "abstract" base
class by using boost macros:

http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/traits.html#export

http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/special.html#export

http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/traits.html#abstract

I did my testcase ( http://codepad.org/6ETp1Ac0 ) completely based on the
demo:
http://www.boost.org/doc/libs/1_47_0/libs/serialization/example/demo.cpp

Compiling and running shows that the derived class archive contains just the
base class data members. What is happening? How can i solve this problem?

I really appreciate any help,
Júlio.



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