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/pool.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/pool.h') diff --git a/src/pool.h b/src/pool.h index 378163e9..6fce0c59 100644 --- a/src/pool.h +++ b/src/pool.h @@ -134,6 +134,24 @@ public: parse_price_expression(const std::string& str, const bool add_prices = true, const optional& moment = none); + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template + void serialize(Archive & ar, const unsigned int /* version */) { + ar & commodities; + ar & null_commodity; + ar & default_commodity; + ar & keep_base; + ar & price_db; + ar & quote_leeway; + ar & get_quotes; + } +#endif // HAVE_BOOST_SERIALIZATION }; } // namespace ledger -- cgit v1.2.3