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/value.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/value.h') diff --git a/src/value.h b/src/value.h index 1670be1b..3c5ce286 100644 --- a/src/value.h +++ b/src/value.h @@ -227,6 +227,20 @@ private: data = false; type = VOID; } + +#if defined(HAVE_BOOST_SERIALIZATION) + private: + /** Serialization. */ + + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int /* version */) { + ar & data; + ar & type; + ar & refc; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** @@ -896,6 +910,20 @@ public: * Debugging methods. */ bool valid() const; + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int /* version */) { + ar & true_value; + ar & false_value; + ar & storage; + } +#endif // HAVE_BOOST_SERIALIZATION }; #define NULL_VALUE (value_t()) -- cgit v1.2.3