|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-05-05 06:13:05
Nicola Musatti wrote:
> Peter Dimov wrote:
> [...]
>> If your serialization methods
>>
>> - allow creation of objects whose invariants do not hold, or
>
> Of course. This is analogous to writing a buggy copy constructor.
>
>> - expose implementation details in the external representation,
>
> This is more tricky: you may want to serialize an object which is in a
> state that in normal circumstances is not the direct outcome of
> construction, but rather is the result of some activity. How can you
> manage that? Either you provide a special purpose constructor or you
> open up the object's internal state.
You store information that allows you to reconstruct the state. There is no
need to open the object's internal state, and it is not entirely clear what
you mean by that.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk