summaryrefslogtreecommitdiff
path: root/account.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-07-30 05:12:46 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-07-30 05:12:46 -0400
commit2aff35215fbe24459aa4057d5b31ea7490046ca6 (patch)
tree6a79a3d84e352e3b3647484b0daf38b1ae6aa81f /account.h
parent230d7fd6027d05422f4bb26e9bfb3758a9cb16ea (diff)
downloadfork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.tar.gz
fork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.tar.bz2
fork-ledger-2aff35215fbe24459aa4057d5b31ea7490046ca6.zip
Enabled a huge number of warning flags for g++ in acprep, and fixed them all
except for several unused parameter warnings (because there is so much code still #if 0'd out), and one implicit conversion from long long to long which still has to be dealt with.
Diffstat (limited to 'account.h')
-rw-r--r--account.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/account.h b/account.h
index ba3c6393..9102a172 100644
--- a/account.h
+++ b/account.h
@@ -33,6 +33,7 @@
#define _ACCOUNT_H
#include "utils.h"
+#include "scope.h"
namespace ledger {
@@ -40,7 +41,7 @@ class account_t;
typedef std::map<const string, account_t *> accounts_map;
-class account_t
+class account_t : public scope_t
{
public:
typedef unsigned long ident_t;
@@ -58,12 +59,13 @@ class account_t
account_t(account_t * _parent = NULL,
const string& _name = "",
const optional<string>& _note = none)
- : parent(_parent), name(_name), note(_note),
+ : scope_t(), parent(_parent), name(_name), note(_note),
depth(parent ? parent->depth + 1 : 0), data(NULL), ident(0) {
TRACE_CTOR(account_t, "account_t *, const string&, const string&");
}
account_t(const account_t& other)
- : parent(other.parent),
+ : scope_t(),
+ parent(other.parent),
name(other.name),
note(other.note),
depth(other.depth),
@@ -91,6 +93,8 @@ class account_t
account_t * find_account(const string& name, bool auto_create = true);
+ virtual expr_t::ptr_op_t lookup(const string& name);
+
bool valid() const;
friend class journal_t;