diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-03 20:28:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-03 20:28:09 -0400 |
commit | 1540ccec01661867b5d758c1e57f26a73b039ac6 (patch) | |
tree | 4f68ad30f6fec17d6f1d9f71fe18276be1d15461 /src/account.h | |
parent | eb45a0a4f46577c6615695256e5f6866a27ef20e (diff) | |
download | fork-ledger-1540ccec01661867b5d758c1e57f26a73b039ac6.tar.gz fork-ledger-1540ccec01661867b5d758c1e57f26a73b039ac6.tar.bz2 fork-ledger-1540ccec01661867b5d758c1e57f26a73b039ac6.zip |
Gather account details in a details_t structure
Diffstat (limited to 'src/account.h')
-rw-r--r-- | src/account.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/account.h b/src/account.h index 79c989bc..bc635829 100644 --- a/src/account.h +++ b/src/account.h @@ -128,26 +128,31 @@ class account_t : public scope_t #define ACCOUNT_EXT_MATCHING 0x10 #define ACCOUNT_EXT_DISPLAYED 0x20 - value_t value; - value_t total; - std::size_t count; // posts counted toward amount - std::size_t total_count; // posts counted toward total - std::size_t virtuals; - std::size_t total_virtuals; + struct details_t + { + value_t total; + + std::size_t posts_count; + std::size_t posts_virtuals_count; + + details_t() + : posts_count(0), + posts_virtuals_count(0) {} + }; + + details_t self_details; + details_t family_details; std::list<sort_value_t> sort_values; - xdata_t() : supports_flags<>(), count(0), total_count(0), virtuals(0) + xdata_t() : supports_flags<>() { TRACE_CTOR(account_t::xdata_t, ""); } xdata_t(const xdata_t& other) : supports_flags<>(other.flags()), - value(other.value), - total(other.total), - count(other.count), - total_count(other.total_count), - virtuals(other.virtuals), + self_details(other.self_details), + family_details(other.family_details), sort_values(other.sort_values) { TRACE_CTOR(account_t::xdata_t, "copy"); |