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/session.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/session.cc') diff --git a/src/session.cc b/src/session.cc index ea9ae180..5caf7a61 100644 --- a/src/session.cc +++ b/src/session.cc @@ -40,6 +40,26 @@ #include "iterators.h" #include "filters.h" +#if defined(HAVE_BOOST_SERIALIZATION) +//BOOST_IS_ABSTRACT(ledger::scope_t) +BOOST_CLASS_EXPORT(ledger::scope_t) +BOOST_CLASS_EXPORT(ledger::child_scope_t) +BOOST_CLASS_EXPORT(ledger::symbol_scope_t) +BOOST_CLASS_EXPORT(ledger::call_scope_t) +BOOST_CLASS_EXPORT(ledger::account_t) +BOOST_CLASS_EXPORT(ledger::item_t) +BOOST_CLASS_EXPORT(ledger::post_t) +BOOST_CLASS_EXPORT(ledger::xact_base_t) +BOOST_CLASS_EXPORT(ledger::xact_t) +BOOST_CLASS_EXPORT(ledger::auto_xact_t) +BOOST_CLASS_EXPORT(ledger::period_xact_t) + +template void ledger::journal_t::serialize(boost::archive::binary_oarchive&, + const unsigned int); +template void ledger::journal_t::serialize(boost::archive::binary_iarchive&, + const unsigned int); +#endif // HAVE_BOOST_SERIALIZATION + namespace ledger { void set_session_context(session_t * session) -- cgit v1.2.3