From ff12101945ffb4df9a8bb4ad023a80b7c833f795 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Mon, 7 Sep 2009 04:19:03 +0000 Subject: [PATCH] serialization --- cpp/Point2.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cpp/Point2.h b/cpp/Point2.h index b0ba92bd1..b6c7dbc9c 100644 --- a/cpp/Point2.h +++ b/cpp/Point2.h @@ -6,6 +6,7 @@ #pragma once +#include #include "Vector.h" namespace gtsam { @@ -57,6 +58,16 @@ namespace gtsam { /** equals with an tolerance, prints out message if unequal*/ bool equals(const Point2& q, double tol = 1e-9) const; + + private: + /** Serialization function */ + friend class boost::serialization::access; + template + void serialize(Archive & ar, const unsigned int version) + { + ar & BOOST_SERIALIZATION_NVP(x_); + ar & BOOST_SERIALIZATION_NVP(y_); + } }; /** equals with an tolerance, prints out message if unequal*/