summaryrefslogtreecommitdiff
path: root/src/iterators.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-12 04:57:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-12 04:57:19 -0400
commit8ee8af3bfba440f6c185aa03b82cb7d0d785b3f3 (patch)
tree7eed4bada75f1d42e705d339fb68ceb80aea7180 /src/iterators.h
parentc328b1b3b2575ce27ce5bfc4d901a7e011d010a8 (diff)
downloadfork-ledger-8ee8af3bfba440f6c185aa03b82cb7d0d785b3f3.tar.gz
fork-ledger-8ee8af3bfba440f6c185aa03b82cb7d0d785b3f3.tar.bz2
fork-ledger-8ee8af3bfba440f6c185aa03b82cb7d0d785b3f3.zip
Restored the "prices" command.
Diffstat (limited to 'src/iterators.h')
-rw-r--r--src/iterators.h37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/iterators.h b/src/iterators.h
index 48abf5fa..8bf05986 100644
--- a/src/iterators.h
+++ b/src/iterators.h
@@ -110,12 +110,12 @@ public:
*/
class entries_iterator : public noncopyable
{
+public:
entries_list::iterator entries_i;
entries_list::iterator entries_end;
bool entries_uninitialized;
-public:
entries_iterator() : entries_uninitialized(true) {
TRACE_CTOR(entries_iterator, "");
}
@@ -164,6 +164,41 @@ public:
*
* Long.
*/
+class xacts_commodities_iterator : public xacts_iterator
+{
+protected:
+ journal_xacts_iterator journal_xacts;
+ entries_iterator entries;
+ entry_xacts_iterator xacts;
+
+ std::list<xact_t> xact_temps;
+ std::list<account_t> acct_temps;
+ entries_list entry_temps;
+
+public:
+ xacts_commodities_iterator() {
+ TRACE_CTOR(xacts_commodities_iterator, "");
+ }
+ xacts_commodities_iterator(journal_t& journal) {
+ TRACE_CTOR(xacts_commodities_iterator, "journal_t&");
+ reset(journal);
+ }
+ virtual ~xacts_commodities_iterator() throw() {
+ TRACE_DTOR(xacts_commodities_iterator);
+ foreach (entry_t * entry, entry_temps)
+ checked_delete(entry);
+ }
+
+ void reset(journal_t& journal);
+
+ virtual xact_t * operator()();
+};
+
+/**
+ * @brief Brief
+ *
+ * Long.
+ */
class accounts_iterator : public noncopyable
{
public: