diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-20 20:05:41 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-20 20:05:41 -0400 |
commit | 3682ea6f8c5b2ef47a17897bd3dc4aca64b76c2f (patch) | |
tree | f4ba45e441d1c828fee1205a9d4db51df28686f9 /src/filters.h | |
parent | 887828a40c54ef41a6e8e09f639539d99bb31639 (diff) | |
download | fork-ledger-3682ea6f8c5b2ef47a17897bd3dc4aca64b76c2f.tar.gz fork-ledger-3682ea6f8c5b2ef47a17897bd3dc4aca64b76c2f.tar.bz2 fork-ledger-3682ea6f8c5b2ef47a17897bd3dc4aca64b76c2f.zip |
Added support for "anonymizing" any report with --anon.
Diffstat (limited to 'src/filters.h')
-rw-r--r-- | src/filters.h | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/filters.h b/src/filters.h index 6955cd91..3f3c28f0 100644 --- a/src/filters.h +++ b/src/filters.h @@ -132,8 +132,8 @@ class sort_xacts : public item_handler<xact_t> { typedef std::deque<xact_t *> xacts_deque; - xacts_deque xacts; - const expr_t sort_order; + xacts_deque xacts; + const expr_t sort_order; sort_xacts(); @@ -239,6 +239,27 @@ public: } }; +class anonymize_xacts : public item_handler<xact_t> +{ + std::list<entry_t> entry_temps; + std::list<xact_t> xact_temps; + + entry_t * last_entry; + + anonymize_xacts(); + +public: + anonymize_xacts(xact_handler_ptr handler) + : item_handler<xact_t>(handler), last_entry(NULL) { + TRACE_CTOR(anonymize_xacts, "xact_handler_ptr"); + } + virtual ~anonymize_xacts() { + TRACE_DTOR(anonymize_xacts); + } + + virtual void operator()(xact_t& xact); +}; + class calc_xacts : public item_handler<xact_t> { xact_t * last_xact; |