Boost logo

Boost Users :

From: Daryle Walker (darylew_at_[hidden])
Date: 2008-07-16 15:25:20


On Jul 16, 2008, at 2:07 PM, Robert Ramey wrote:

>> So I'll just define serialization in every class in the hierarchy,
>> and make sure each non-root class calls "ar &
>> boost::serialization::base_object<BASE_TYPE>(*this)". Can I use a
>> typedef for the base type, or do I have to use the original name
>> expression?
>>
>> Does this all work for any kind of base: non-polymorphic,
>> polymorphic, virtual inheritance, and/or multiple inheritance?
>
> yes

I guess for multiple inheritance, one would serialize all the
(direct) base classes. Do they have to be in declaration order? And
for a virtual base class, wouldn't _every_ derived class have to
serialize it in its code, since a derived class wouldn't know if it's
the final type or not? How do you make sure the virtual base class
gets serialized exactly once? Do you use reference counting here, or
make sure that multiple-serialization is safe?

-- 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

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