From 8ee8af3bfba440f6c185aa03b82cb7d0d785b3f3 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 12 Feb 2009 04:57:19 -0400 Subject: Restored the "prices" command. --- src/iterators.h | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) (limited to 'src/iterators.h') 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, ""); } @@ -159,6 +159,41 @@ public: virtual xact_t * operator()(); }; +/** + * @brief Brief + * + * Long. + */ +class xacts_commodities_iterator : public xacts_iterator +{ +protected: + journal_xacts_iterator journal_xacts; + entries_iterator entries; + entry_xacts_iterator xacts; + + std::list xact_temps; + std::list 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 * -- cgit v1.2.3