summaryrefslogtreecommitdiff
path: root/src/filters.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-09 09:55:37 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-09 09:55:37 -0400
commit556211e623cad88213e5087b5c9c36e754d9aa02 (patch)
tree9b4d0197448cd8587e11f5e3e65214e9dc80e3a7 /src/filters.h
parent14476a63f4abbdce5311ace031b7345a34af060b (diff)
parentc28fad384c28fb929fc8ea69854496141bdf306a (diff)
downloadledger-556211e623cad88213e5087b5c9c36e754d9aa02.tar.gz
ledger-556211e623cad88213e5087b5c9c36e754d9aa02.tar.bz2
ledger-556211e623cad88213e5087b5c9c36e754d9aa02.zip
Merge branch 'next'
Diffstat (limited to 'src/filters.h')
-rw-r--r--src/filters.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/filters.h b/src/filters.h
index 3f2f2145..ffca9d1e 100644
--- a/src/filters.h
+++ b/src/filters.h
@@ -334,20 +334,26 @@ public:
class anonymize_posts : public item_handler<post_t>
{
- temporaries_t temps;
- xact_t * last_xact;
+ typedef std::map<commodity_t *, std::size_t> commodity_index_map;
+
+ temporaries_t temps;
+ commodity_index_map comms;
+ std::size_t next_comm_id;
+ xact_t * last_xact;
anonymize_posts();
public:
anonymize_posts(post_handler_ptr handler)
- : item_handler<post_t>(handler), last_xact(NULL) {
+ : item_handler<post_t>(handler), next_comm_id(0), last_xact(NULL) {
TRACE_CTOR(anonymize_posts, "post_handler_ptr");
}
virtual ~anonymize_posts() {
TRACE_DTOR(anonymize_posts);
}
+ void render_commodity(amount_t& amt);
+
virtual void operator()(post_t& post);
virtual void clear() {