summaryrefslogtreecommitdiff
path: root/src/session.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-30 18:06:37 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-30 18:06:37 -0400
commita757b19f51ac7aa120e6829b573187b1ff36301a (patch)
tree5e6d4ef278f3f9915713f958979a4c35a53378fb /src/session.cc
parent1b8811f997568d8aede86197a36fc65586996494 (diff)
downloadfork-ledger-a757b19f51ac7aa120e6829b573187b1ff36301a.tar.gz
fork-ledger-a757b19f51ac7aa120e6829b573187b1ff36301a.tar.bz2
fork-ledger-a757b19f51ac7aa120e6829b573187b1ff36301a.zip
Added serialization methods for most type
This allows journal_t objects to be completed serialized to disk and deserialized.
Diffstat (limited to 'src/session.cc')
-rw-r--r--src/session.cc20
1 files changed, 20 insertions, 0 deletions
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)