summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-06-21 05:37:40 -0400
committerjohnw <johnw@newartisans.com>2004-06-21 05:37:40 -0400
commitf077b655d01364275c1f8944aee0a0ed2d530245 (patch)
treeaff89cb52a6c41e135afb5cf6584ec255f05d5d5 /amount.cc
parentc892e8c7ad0aaf6c47ff6e9075149a76188ae670 (diff)
downloadfork-ledger-f077b655d01364275c1f8944aee0a0ed2d530245.tar.gz
fork-ledger-f077b655d01364275c1f8944aee0a0ed2d530245.tar.bz2
fork-ledger-f077b655d01364275c1f8944aee0a0ed2d530245.zip
pricing fixes, added price command
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/amount.cc b/amount.cc
index f2e1c871..3217c698 100644
--- a/amount.cc
+++ b/amount.cc
@@ -58,7 +58,8 @@ class gmp_amount : public amount
virtual amount * value(const amount *) const;
virtual void set_value(const amount * val);
virtual amount * street(std::time_t * when = NULL,
- bool get_quotes = false) const;
+ bool use_history = false,
+ bool download = false) const;
virtual bool has_price() const {
return priced;
@@ -215,7 +216,8 @@ amount * gmp_amount::value(const amount * pr) const
}
}
-amount * gmp_amount::street(std::time_t * when, bool get_quotes) const
+amount * gmp_amount::street(std::time_t * when,
+ bool use_history, bool download) const
{
static std::time_t now = std::time(NULL);
if (! when)
@@ -228,7 +230,7 @@ amount * gmp_amount::street(std::time_t * when, bool get_quotes) const
int max = 10;
while (--max >= 0) {
- amount * price = amt->commdty()->price(when, get_quotes);
+ amount * price = amt->commdty()->price(when, use_history, download);
if (! price)
break;