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/mask.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/mask.h') diff --git a/src/mask.h b/src/mask.h index 065d06a2..011c6f61 100644 --- a/src/mask.h +++ b/src/mask.h @@ -94,6 +94,25 @@ public: } return true; } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int /* version */) { + string temp; + if (Archive::is_loading::value) { + ar & temp; + *this = temp; + } else { + temp = expr.str(); + ar & temp; + } + } +#endif // HAVE_BOOST_SERIALIZATION }; inline std::ostream& operator<<(std::ostream& out, const mask_t& mask) { -- cgit v1.2.3