diff options
author | John Wiegley <johnw@newartisans.com> | 2004-11-08 06:43:11 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 02:40:47 -0400 |
commit | c9fb11bd60a2170fb896d77ff8d7706f563ad597 (patch) | |
tree | 42bdf09e7d8727ba31d1d8dae9b4eb4b2a605441 /quotes.h | |
parent | fa2ceaed13c031add578ee8eb33da0c9980b9fb1 (diff) | |
download | fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.tar.gz fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.tar.bz2 fork-ledger-c9fb11bd60a2170fb896d77ff8d7706f563ad597.zip |
updated to version 2.0
Diffstat (limited to 'quotes.h')
-rw-r--r-- | quotes.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/quotes.h b/quotes.h new file mode 100644 index 00000000..53008aa0 --- /dev/null +++ b/quotes.h @@ -0,0 +1,30 @@ +#ifndef _QUOTES_H +#define _QUOTES_H + +#include "amount.h" + +namespace ledger { + +class quotes_by_script : public commodity_t::updater_t +{ + std::string price_db; + unsigned long pricing_leeway; + bool& cache_dirty; + + public: + quotes_by_script(std::string _price_db, + unsigned long _pricing_leeway, + bool& _cache_dirty) + : price_db(_price_db), pricing_leeway(_pricing_leeway), + cache_dirty(_cache_dirty) {} + + virtual void operator()(commodity_t& commodity, + const std::time_t moment, + const std::time_t date, + const std::time_t last, + amount_t& price); +}; + +} // namespace ledger + +#endif // _QUOTES_H |