From f2f52066d2a9c82619ffea0f3972e48417a90b5b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 19 Feb 2009 22:36:08 -0400 Subject: Added a --strict session option When enabled, if any accounts or commodities are seen in an uncleared transaction, which were not seen previously in a cleared or pending transaction or a textual directive dealing with accounts or commodities, a warning is generated about the unknown item. --- src/account.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/account.h') diff --git a/src/account.h b/src/account.h index f9fd2f52..8b485ec2 100644 --- a/src/account.h +++ b/src/account.h @@ -69,6 +69,7 @@ class account_t : public scope_t optional note; unsigned short depth; accounts_map accounts; + bool known; mutable void * data; mutable string _fullname; @@ -77,7 +78,8 @@ class account_t : public scope_t const string& _name = "", const optional& _note = none) : scope_t(), parent(_parent), name(_name), note(_note), - depth(parent ? parent->depth + 1 : 0), data(NULL) { + depth(parent ? parent->depth + 1 : 0), + known(false), data(NULL) { TRACE_CTOR(account_t, "account_t *, const string&, const string&"); } account_t(const account_t& other) @@ -87,6 +89,7 @@ class account_t : public scope_t note(other.note), depth(other.depth), accounts(other.accounts), + known(other.known), data(NULL) { TRACE_CTOR(account_t, "copy"); assert(other.data == NULL); -- cgit v1.2.3