(class journal_t): Added a "basket" account member, which if set is

the account to which all single-transaction entries are balanced.
This commit is contained in:
John Wiegley 2005-06-22 23:04:46 +00:00
parent 5175fdcd6c
commit 86941556b8

View file

@ -320,6 +320,7 @@ class journal_t
{ {
public: public:
account_t * master; account_t * master;
account_t * basket;
entries_list entries; entries_list entries;
strings_list sources; strings_list sources;
std::string price_db; std::string price_db;
@ -332,7 +333,7 @@ class journal_t
std::list<entry_finalizer_t *> entry_finalize_hooks; std::list<entry_finalizer_t *> entry_finalize_hooks;
journal_t() { journal_t() : basket(NULL) {
DEBUG_PRINT("ledger.memory.ctors", "ctor journal_t"); DEBUG_PRINT("ledger.memory.ctors", "ctor journal_t");
master = new account_t(NULL, ""); master = new account_t(NULL, "");
master->journal = this; master->journal = this;