|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2003-12-04 19:17:27
Vladimir Prus wrote:
>Say I have class "Data" with private constructor. I serialize it like this
> binary_oarchive oa(...);
> Data data(....);
> oa << data;
>Now, how do I deserialize it? I can't write
> Data data;
> ia >> data;
>Since ctor is private. I would guess it's still possible to deserialize this
>class, but I don't know how.
what's the matter with
Data data(....);
ia >> data;
I don't see how the fact you want to construct different ways is related
serialization. Unless its a pointer, serialization presumes the
instance has already been constructed. How this is done is
outside the influence of the serialization library.
Robert Ramey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk