|
Boost Users : |
Subject: Re: [Boost-users] Serializing handles to opaque objects
From: James Amundson (amundson_at_[hidden])
Date: 2011-10-28 13:41:40
On 10/28/2011 01:09 AM, Robert Ramey wrote:
> James Amundson wrote:
>> I am trying to use Boost Serialization with a set of classes which
>> contain handles to opaque objects written in C. (Specifically, the
>> objects are MPI communicator objects and the handles are of the
>> MPI_Comm type, but I don't think that's important for the problem.)
> This is easy to do.
Great. That's the kind of answer I was looking for.
> I'mplement serialization for your object.
>
> Use shared_ptr for your opaque handle. The smart pointer
> library has examples on how to do this.
>
> serialize the resulting smart pointer.
>
Ah, I see. I was looking for a serialization-specific solution.
Shared_ptr makes perfect sense.
Thanks,
Jim
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