From a4c769fddc9289ee5996e8a0f27a65de6906abf2 Mon Sep 17 00:00:00 2001 From: Manohar Paluri Date: Fri, 12 Mar 2010 14:20:29 +0000 Subject: [PATCH] Added serialization to Pose2 --- cpp/Pose2.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpp/Pose2.h b/cpp/Pose2.h index 7708a11b9..85f4f1c50 100644 --- a/cpp/Pose2.h +++ b/cpp/Pose2.h @@ -73,6 +73,14 @@ namespace gtsam { static inline size_t dim() { return 3; }; + private: + // Serialization function + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) { + ar & BOOST_SERIALIZATION_NVP(t_); + ar & BOOST_SERIALIZATION_NVP(r_); + } }; // Pose2 /** print using member print function, currently used by LieConfig */