summaryrefslogtreecommitdiff
path: root/src/account.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-04-12 02:39:23 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-04-13 15:16:27 -0500
commit1e572d508d27738142dd5e80ea6745043eed8f18 (patch)
tree7bceb132c69a10316473a8c0972936198e1124a0 /src/account.h
parent6a5360e2b570d21b321f901ca5584780a6111121 (diff)
downloadfork-ledger-1e572d508d27738142dd5e80ea6745043eed8f18.tar.gz
fork-ledger-1e572d508d27738142dd5e80ea6745043eed8f18.tar.bz2
fork-ledger-1e572d508d27738142dd5e80ea6745043eed8f18.zip
Add 'data' member to account/journal objects
Diffstat (limited to 'src/account.h')
-rw-r--r--src/account.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/account.h b/src/account.h
index fd98a9ac..c0e3e1f7 100644
--- a/src/account.h
+++ b/src/account.h
@@ -70,13 +70,20 @@ public:
optional<expr_t> value_expr;
mutable string _fullname;
+#ifdef DOCUMENT_MODEL
+ mutable void * data;
+#endif
account_t(account_t * _parent = NULL,
const string& _name = "",
const optional<string>& _note = none)
: supports_flags<>(), scope_t(), parent(_parent),
name(_name), note(_note),
- depth(static_cast<unsigned short>(parent ? parent->depth + 1 : 0)) {
+ depth(static_cast<unsigned short>(parent ? parent->depth + 1 : 0))
+#ifdef DOCUMENT_MODEL
+ , data(NULL)
+#endif
+ {
TRACE_CTOR(account_t, "account_t *, const string&, const string&");
}
account_t(const account_t& other)
@@ -85,10 +92,14 @@ public:
name(other.name),
note(other.note),
depth(other.depth),
- accounts(other.accounts) {
+ accounts(other.accounts)
+#ifdef DOCUMENT_MODEL
+ , data(NULL)
+#endif
+ {
TRACE_CTOR(account_t, "copy");
}
- ~account_t();
+ virtual ~account_t();
virtual string description() {
return string(_("account ")) + fullname();