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/flags.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/flags.h') diff --git a/src/flags.h b/src/flags.h index 21607fc2..33935556 100644 --- a/src/flags.h +++ b/src/flags.h @@ -99,6 +99,17 @@ public: void drop_flags(const flags_t arg) { _flags = static_cast(static_cast(_flags) & static_cast(~arg)); } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int /* version */) + { + ar & _flags; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** @@ -201,6 +212,17 @@ public: void drop_flags(const flags_t arg) { _flags.drop_flags(arg); } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int /* version */) + { + ar & _flags; + } +#endif // HAVE_BOOST_SERIALIZATION }; #endif // _FLAGS_H -- cgit v1.2.3