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/account.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/account.h') diff --git a/src/account.h b/src/account.h index 8c276c8a..9dc467bc 100644 --- a/src/account.h +++ b/src/account.h @@ -232,6 +232,26 @@ public: return xdata_ && xdata_->has_flags(flags); } std::size_t children_with_flags(xdata_t::flags_t flags) const; + +#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); + ar & boost::serialization::base_object(*this); + ar & parent; + ar & name; + ar & note; + ar & depth; + ar & accounts; + ar & posts; + ar & _fullname; + } +#endif // HAVE_BOOST_SERIALIZATION }; std::ostream& operator<<(std::ostream& out, const account_t& account); -- cgit v1.2.3