diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-30 05:12:46 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-30 05:12:46 -0400 |
commit | 2aff35215fbe24459aa4057d5b31ea7490046ca6 (patch) | |
tree | 6a79a3d84e352e3b3647484b0daf38b1ae6aa81f /account.h | |
parent | 230d7fd6027d05422f4bb26e9bfb3758a9cb16ea (diff) | |
download | fork-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.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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; |