update comment for serialization

release/4.3a0
Duy-Nguyen Ta 2012-02-03 21:40:36 +00:00
parent 8ee1370965
commit 1ef82b6e84
1 changed files with 11 additions and 7 deletions

View File

@ -149,24 +149,28 @@ namespace gtsam {
* (Those derived objects are stored in Values as pointer to this abstract base class Value) * (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: * 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<Value>(*this)); * \code
ar & boost::serialization::make_nvp("DERIVED", boost::serialization::base_object<Value>(*this));
\endcode
* or, alternatively * 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 * 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 * 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/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 or BOOST_CLASS_EXPORT_GUID macros:
* \code
* BOOST_CLASS_EXPORT(DERIVED_CLASS_1) BOOST_CLASS_EXPORT(DERIVED_CLASS_1)
* BOOST_CLASS_EXPORT_GUID(DERIVED_CLASS_2, "DERIVED_CLASS_2_ID_STRING") 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 * 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#export
* http://www.boost.org/doc/libs/release/libs/serialization/doc/serialization.html#instantiation\ * 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/special.html#export
* http://www.boost.org/doc/libs/release/libs/serialization/doc/traits.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. * any of the archive class headers.
* */ * */
friend class boost::serialization::access; friend class boost::serialization::access;