Ares Lagae <[EMAIL PROTECTED]> writes:

>> If you're willing to intrude on the design of Foo, there are much
>> cleaner solutions using friend.  However, non-intrusive serialization
>> should generally be possible even for classes which are
>> well-encapsulated.
>
> ok (i'm just making suggestions for the sake of discussion here)
>
> suppose we do it like this:
>

<snip>

> with this mechanism the user has the choise between intrusive and
> non-intrusive serialisation

> - intrusive: in class A, initialize a Class<A> object with the datamembers
> - non intrusive: for class B, specialize the Class<B> template

The challenging part about the non-intrusive case is
*de-serialization*, though.

AFAICT, the Python approach of serializing something which can be used
to get constructor arguments for de-serializing (probably with
placement new) is a promising strategy.

-- 
                       David Abrahams
   [EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to