Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-11-03 17:38:49


Christoph wrote:
> Consider the following class hierarchy:
>
> A - B - C1
> \- B2 - C2
>
> Is the following correct:
> * when A is an abstract class then (without any data members!) then I
> do not need to provide serialization support for this class

use BOOST_IS_ABSTRACT(A)
then you don't have provide serialization support

> * when A does have data members (and so does C) but B does not add
> any data and B furthermore is abstract (so the actuall class will be
> C1..) then no searialization support is needed for B?

if you want to serialize the data in A then B should have

ar & base_object(A)(*this)

Robert Ramey

>
> Is this correct?
> Should I provide serialization support for these classes even *if* it
> is correct?
>
> Best regards and thank you
> Christoph


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