summaryrefslogtreecommitdiff
path: root/src/xact.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-15 15:41:24 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-15 15:41:24 -0400
commit03219d910f527b6a4c5f563aab6152145a51e0fa (patch)
tree8ed61d455944fce36caa566de5a9492d749cade0 /src/xact.h
parent36b96c47ac79fd124d1ba4f53b4721179782985f (diff)
downloadfork-ledger-03219d910f527b6a4c5f563aab6152145a51e0fa.tar.gz
fork-ledger-03219d910f527b6a4c5f563aab6152145a51e0fa.tar.bz2
fork-ledger-03219d910f527b6a4c5f563aab6152145a51e0fa.zip
Added xact_t::count member
This allows reports to access the "whicheth" index of the reported transaction. It's used mainly by the --average report, which divides the running total by this count to get the arithmetic mean.
Diffstat (limited to 'src/xact.h')
-rw-r--r--src/xact.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xact.h b/src/xact.h
index 11bd289d..b766383b 100644
--- a/src/xact.h
+++ b/src/xact.h
@@ -140,6 +140,7 @@ public:
#define XACT_EXT_MATCHES 0x80
value_t total;
+ std::size_t count;
value_t value;
date_t date;
account_t * account;
@@ -147,12 +148,14 @@ public:
std::list<sort_value_t> sort_values;
- xdata_t() : supports_flags<>(), account(NULL), ptr(NULL) {
+ xdata_t()
+ : supports_flags<>(), count(0), account(NULL), ptr(NULL) {
TRACE_CTOR(xact_t::xdata_t, "");
}
xdata_t(const xdata_t& other)
: supports_flags<>(other.flags()),
total(other.total),
+ count(other.count),
value(other.value),
date(other.date),
account(other.account),