hi i have couple questions about boost serilazation regarding shared pointers. First off i was wondering if boost::shared_ptr has working serilazation code? if so maybe i can learn from there. What's im trying to do is save fairly simple custom shared-pointer class. All it should take is to save the pointer in the class and ref count as well the Parent variable which is pointer to the parent shared-pointer. what needs to be considered for this? should i disable tracking for the shared-pointer and does the pointer stored in the shared-pointer require some special considerations? thanks.
no one has answered yet.
my main question simply is does boost serialization support smart pointers
or is that more or less unimplemented yet?
i maybe trying to use boost to something it can't do.
thanks
On Sun, Apr 14, 2013 at 9:22 AM, Jari
hi i have couple questions about boost serilazation regarding shared pointers. First off i was wondering if boost::shared_ptr has working serilazation code? if so maybe i can learn from there.
What's im trying to do is save fairly simple custom shared-pointer class. All it should take is to save the pointer in the class and ref count as well the Parent variable which is pointer to the parent shared-pointer.
what needs to be considered for this? should i disable tracking for the shared-pointer and does the pointer stored in the shared-pointer require some special considerations?
thanks.
Hi Jari, As far as I know (and have used it for years), boost::shared_ptr<> is fully supported by Boost/Serialization. Particularly I use a wrapper template class with a boost::shared_ptr<> attribute. There is also additionnal code to equip this wrapper class with the ::boost::serialization::track_never trait. At the end, it works perfectly. regards frc --
Le 23/04/2013 00:31, Jari a écrit : no one has answered yet. my main question simply is does boost serialization support smart pointers or is that more or less unimplemented yet? i maybe trying to use boost to something it can't do.
thanks
On Sun, Apr 14, 2013 at 9:22 AM, Jari
mailto:jaristr@gmail.com> wrote: hi i have couple questions about boost serilazation regarding shared pointers. First off i was wondering if boost::shared_ptr has working serilazation code? if so maybe i can learn from there.
What's im trying to do is save fairly simple custom shared-pointer class. All it should take is to save the pointer in the class and ref count as well the Parent variable which is pointer to the parent shared-pointer.
what needs to be considered for this? should i disable tracking for the shared-pointer and does the pointer stored in the shared-pointer require some special considerations?
thanks.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
-- François Mauger Groupe "Interactions Fondamentales et Nature du Neutrino" NEMO-3/SuperNEMO Collaboration LPC Caen-CNRS/IN2P3-UCBN-ENSICAEN Département de Physique -- Université de Caen Basse-Normandie Adresse/address: Laboratoire de Physique Corpusculaire de Caen (UMR 6534) ENSICAEN 6, Boulevard du Marechal Juin 14050 CAEN Cedex FRANCE Courriel/e-mail: mauger@lpccaen.in2p3.fr Tél./phone: 02 31 45 25 12 / (+33) 2 31 45 25 12 Fax: 02 31 45 25 49 / (+33) 2 31 45 25 49
participants (2)
-
Francois Mauger
-
Jari