From a757b19f51ac7aa120e6829b573187b1ff36301a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 30 Oct 2009 18:06:37 -0400 Subject: Added serialization methods for most type This allows journal_t objects to be completed serialized to disk and deserialized. --- src/utils.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index e3ae5dda..c662acbe 100644 --- a/src/utils.h +++ b/src/utils.h @@ -178,6 +178,18 @@ public: string(const char * str, size_type x); string(const char * str, size_type x, size_type y); ~string() throw(); + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int /* version */) { + ar & boost::serialization::base_object(*this); + } +#endif // HAVE_BOOST_SERIALIZATION }; inline string operator+(const string& __lhs, const string& __rhs) -- cgit v1.2.3