|
Boost Users : |
Subject: Re: [Boost-users] (De-) Serialization with constructor arguments
From: Damien Hocking (damien_at_[hidden])
Date: 2009-05-11 01:09:42
That gets very close but not quite there. The problem is that the
argument going through the constructor isn't serialized data so I can't
read it from the archive. It comes from the main app. I could do some
tap-dancing with copy constructors but that could get messy and slow and
I'd rather not have a separate ::SetXYZ(ArgType arg) method that has to
be called at the end of each serialization. That might be the simplest
option though.
Damien
Robert Ramey wrote:
> You could also look at the documentation
>
> serialization->reference->Serializable Concept->Pointers->Non-Default
> constructors.
>
> Robert Ramey
>
> Damien Hocking wrote:
>
>> Hi all,
>>
>> I'm using boost::serialization in a project and I was wondering if
>> there's a way to deserialize through a non-default constructor that
>> takes an argument. All the examples I've seen use default
>> constructors.
>> Damien
>>
>
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
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