update comment for serialization
							parent
							
								
									8ee1370965
								
							
						
					
					
						commit
						1ef82b6e84
					
				|  | @ -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<Value>(*this)); | ||||
|   	 * 			\code | ||||
|   	  					ar & boost::serialization::make_nvp("DERIVED", boost::serialization::base_object<Value>(*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; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue