diff options
author | John Wiegley <johnw@newartisans.com> | 2009-10-31 00:55:56 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-10-31 00:55:56 -0400 |
commit | a2cb549b1dff9024e3f700203e424e496b25fd91 (patch) | |
tree | 1c03e9eb6f649a1446021dfb2a5d93a697f81feb /src/xact.h | |
parent | 349fc5d175bc5c4acbc478b4d78c12dc507c4f58 (diff) | |
parent | a88a4c55b2b11d58d3b9e49bf785be42afe63510 (diff) | |
download | fork-ledger-a2cb549b1dff9024e3f700203e424e496b25fd91.tar.gz fork-ledger-a2cb549b1dff9024e3f700203e424e496b25fd91.tar.bz2 fork-ledger-a2cb549b1dff9024e3f700203e424e496b25fd91.zip |
Merge branch 'next'
Diffstat (limited to 'src/xact.h')
-rw-r--r-- | src/xact.h | 69 |
1 files changed, 68 insertions, 1 deletions
@@ -80,6 +80,20 @@ public: virtual bool finalize(); virtual bool valid() const = 0; + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) { + ar & boost::serialization::base_object<item_t>(*this); + ar & journal; + ar & posts; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** @@ -111,6 +125,20 @@ public: virtual expr_t::ptr_op_t lookup(const string& name); virtual bool valid() const; + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) { + ar & boost::serialization::base_object<xact_base_t>(*this); + ar & code; + ar & payee; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** @@ -154,6 +182,19 @@ public: virtual bool valid() const { return true; } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) { + ar & boost::serialization::base_object<xact_base_t>(*this); + ar & predicate; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** @@ -180,6 +221,18 @@ struct auto_xact_finalizer_t : public xact_finalizer_t } virtual bool operator()(xact_t& xact, bool post); + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) { + ar & journal; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** @@ -205,7 +258,7 @@ class period_xact_t : public xact_base_t TRACE_CTOR(period_xact_t, "const string&"); } - virtual ~period_xact_t() throw() { + virtual ~period_xact_t() { TRACE_DTOR(period_xact_t); } @@ -218,6 +271,20 @@ class period_xact_t : public xact_base_t #endif return true; } + +#if defined(HAVE_BOOST_SERIALIZATION) +private: + /** Serialization. */ + + friend class boost::serialization::access; + + template<class Archive> + void serialize(Archive & ar, const unsigned int /* version */) { + ar & boost::serialization::base_object<xact_base_t>(*this); + ar & period; + ar & period_string; + } +#endif // HAVE_BOOST_SERIALIZATION }; /** |