summaryrefslogtreecommitdiff
path: root/src/filters.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-12 14:29:08 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-12 14:29:08 -0500
commitbfd9ecf2af079894f95bac365818c9548f561039 (patch)
treedce7e13ec7ad8f18bc628efe511d17e94bc3e16d /src/filters.h
parenta034435c4287aba7fd32ed63a745e560350c924a (diff)
parent49a356f2d260ed0cc071ca1aa82027bd325b0b8b (diff)
downloadfork-ledger-bfd9ecf2af079894f95bac365818c9548f561039.tar.gz
fork-ledger-bfd9ecf2af079894f95bac365818c9548f561039.tar.bz2
fork-ledger-bfd9ecf2af079894f95bac365818c9548f561039.zip
Merge branch 'next'
Diffstat (limited to 'src/filters.h')
-rw-r--r--src/filters.h34
1 files changed, 32 insertions, 2 deletions
diff --git a/src/filters.h b/src/filters.h
index ba3692ac..80bbe5b4 100644
--- a/src/filters.h
+++ b/src/filters.h
@@ -61,6 +61,35 @@ public:
virtual void operator()(post_t&) {}
};
+class collect_posts : public item_handler<post_t>
+{
+public:
+ std::vector<post_t *> posts;
+
+ collect_posts() : item_handler<post_t>() {
+ TRACE_CTOR(collect_posts, "");
+ }
+ virtual ~collect_posts() {
+ TRACE_DTOR(collect_posts);
+ }
+
+ std::size_t length() const {
+ return posts.size();
+ }
+
+ std::vector<post_t *>::iterator begin() {
+ return posts.begin();
+ }
+ std::vector<post_t *>::iterator end() {
+ return posts.end();
+ }
+
+ virtual void flush() {}
+ virtual void operator()(post_t& post) {
+ posts.push_back(&post);
+ }
+};
+
class posts_iterator;
class pass_down_posts : public item_handler<post_t>
@@ -550,8 +579,9 @@ class transfer_details : public item_handler<post_t>
public:
enum element_t {
- SET_PAYEE,
- SET_ACCOUNT
+ SET_DATE,
+ SET_ACCOUNT,
+ SET_PAYEE
} which_element;
transfer_details(post_handler_ptr handler,