From 1ef82b6e84bed7b38a1d19e58eb1fdfe679ebe0e Mon Sep 17 00:00:00 2001 From: Duy-Nguyen Ta Date: Fri, 3 Feb 2012 21:40:36 +0000 Subject: [PATCH] update comment for serialization --- gtsam/base/Value.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/gtsam/base/Value.h b/gtsam/base/Value.h index 8a6482b37..394a11e72 100644 --- a/gtsam/base/Value.h +++ b/gtsam/base/Value.h @@ -149,24 +149,28 @@ namespace gtsam { * (Those derived objects are stored in Values as pointer to this abstract base class Value) * * 1. All DERIVED classes derived from Value must put the following line in their serialization function: - * ar & boost::serialization::make_nvp("DERIVED", boost::serialization::base_object(*this)); + * \code + ar & boost::serialization::make_nvp("DERIVED", boost::serialization::base_object(*this)); + \endcode * or, alternatively - * ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Value); + * \code + ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Value); + \endcode * See: http://www.boost.org/doc/libs/release/libs/serialization/doc/serialization.html#runtimecasting * * 2. The source module that includes archive class headers to serialize objects of derived classes * (boost/archive/text_oarchive.h, for example) must *export* all derived classes, using either * BOOST_CLASS_EXPORT or BOOST_CLASS_EXPORT_GUID macros: - * - * BOOST_CLASS_EXPORT(DERIVED_CLASS_1) - * BOOST_CLASS_EXPORT_GUID(DERIVED_CLASS_2, "DERIVED_CLASS_2_ID_STRING") - * + \code + BOOST_CLASS_EXPORT(DERIVED_CLASS_1) + BOOST_CLASS_EXPORT_GUID(DERIVED_CLASS_2, "DERIVED_CLASS_2_ID_STRING") + \endcode * See: http://www.boost.org/doc/libs/release/libs/serialization/doc/serialization.html#derivedpointers * http://www.boost.org/doc/libs/release/libs/serialization/doc/serialization.html#export * http://www.boost.org/doc/libs/release/libs/serialization/doc/serialization.html#instantiation\ * http://www.boost.org/doc/libs/release/libs/serialization/doc/special.html#export * http://www.boost.org/doc/libs/release/libs/serialization/doc/traits.html#export - * The last two links explain why this export line has to be in the same source module that includes + * The last two links explain why these export lines have to be in the same source module that includes * any of the archive class headers. * */ friend class boost::serialization::access;