summaryrefslogtreecommitdiff
path: root/src/pool.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-19 21:53:02 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-19 22:24:24 -0500
commit4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2 (patch)
treee4bce67522d52cd7be03544501191d761dce7799 /src/pool.h
parent6e31328bd62d15e8da4238394abd8de65539cfa2 (diff)
downloadfork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.tar.gz
fork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.tar.bz2
fork-ledger-4e30fcdf4094a0c450cbe1918c2e12dd19eb58f2.zip
Many improvements to Ledger's Python bindings
Diffstat (limited to 'src/pool.h')
-rw-r--r--src/pool.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pool.h b/src/pool.h
index 7328df9d..c3d701b9 100644
--- a/src/pool.h
+++ b/src/pool.h
@@ -57,6 +57,7 @@ struct cost_breakdown_t
class commodity_pool_t : public noncopyable
{
+public:
/**
* The commodities collection in commodity_pool_t maintains pointers to all
* the commodities which have ever been created by the user, whether
@@ -65,7 +66,6 @@ class commodity_pool_t : public noncopyable
*/
typedef std::map<string, commodity_t *> commodities_map;
-public:
commodities_map commodities;
commodity_t * null_commodity;
commodity_t * default_commodity;
@@ -76,6 +76,8 @@ public:
long quote_leeway; // --leeway=
bool get_quotes; // --download
+ static shared_ptr<commodity_pool_t> current_pool;
+
function<optional<price_point_t>
(commodity_t& commodity, const optional<commodity_t&>& in_terms_of)>
get_commodity_quote;
@@ -136,6 +138,7 @@ private:
template<class Archive>
void serialize(Archive& ar, const unsigned int /* version */) {
+ ar & current_pool;
ar & commodities;
ar & null_commodity;
ar & default_commodity;