diff options
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/src/amount.cc b/src/amount.cc index 6ddcdb4f..b0898bfb 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -93,20 +93,6 @@ struct amount_t::bigint_t : public supports_flags<> } return true; } - -#if HAVE_BOOST_SERIALIZATION -private: - friend class boost::serialization::access; - - template<class Archive> - void serialize(Archive& ar, const unsigned int /* version */) - { - ar & boost::serialization::base_object<supports_flags<> >(*this); - ar & val; - ar & prec; - ar & refc; - } -#endif // HAVE_BOOST_SERIALIZATION }; bool amount_t::is_initialized = false; @@ -1331,69 +1317,4 @@ void put_amount(property_tree::ptree& st, const amount_t& amt, st.put("quantity", amt.quantity_string()); } -#if HAVE_BOOST_SERIALIZATION - -template<class Archive> -void amount_t::serialize(Archive& ar, const unsigned int /* version */) -{ - ar & is_initialized; - ar & quantity; - ar & commodity_; -} - -#endif // HAVE_BOOST_SERIALIZATION - } // namespace ledger - -#if HAVE_BOOST_SERIALIZATION -namespace boost { -namespace serialization { - -template <class Archive> -void serialize(Archive& ar, MP_INT& mpz, const unsigned int /* version */) -{ - ar & mpz._mp_alloc; - ar & mpz._mp_size; - ar & mpz._mp_d; -} - -template <class Archive> -void serialize(Archive& ar, MP_RAT& mpq, const unsigned int /* version */) -{ - ar & mpq._mp_num; - ar & mpq._mp_den; -} - -template <class Archive> -void serialize(Archive& ar, long unsigned int& integer, - const unsigned int /* version */) -{ - ar & make_binary_object(&integer, sizeof(long unsigned int)); -} - -} // namespace serialization -} // namespace boost - -BOOST_CLASS_EXPORT(ledger::annotated_commodity_t) - -template void boost::serialization::serialize(boost::archive::binary_iarchive&, - MP_INT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_oarchive&, - MP_INT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_iarchive&, - MP_RAT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_oarchive&, - MP_RAT&, const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_iarchive&, - long unsigned int&, - const unsigned int); -template void boost::serialization::serialize(boost::archive::binary_oarchive&, - long unsigned int&, - const unsigned int); - -template void ledger::amount_t::serialize(boost::archive::binary_iarchive&, - const unsigned int); -template void ledger::amount_t::serialize(boost::archive::binary_oarchive&, - const unsigned int); - -#endif // HAVE_BOOST_SERIALIZATION |