diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-23 19:31:06 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-23 19:31:06 -0400 |
commit | eda6cbd0146d371653feec70e0eb3ee4e4c56379 (patch) | |
tree | aeb4e1ace0f9b284789f66f3ceb30bed66946b93 /src/filters.h | |
parent | 014fde3418783d1ee1ec7fe4ea6c8b04ae7f6cd8 (diff) | |
parent | 93807fade69dd4f0ec575eda78fe1a77a85c24e3 (diff) | |
download | fork-ledger-eda6cbd0146d371653feec70e0eb3ee4e4c56379.tar.gz fork-ledger-eda6cbd0146d371653feec70e0eb3ee4e4c56379.tar.bz2 fork-ledger-eda6cbd0146d371653feec70e0eb3ee4e4c56379.zip |
Merge branch 'next'
Diffstat (limited to 'src/filters.h')
-rw-r--r-- | src/filters.h | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/src/filters.h b/src/filters.h index 9102d4f1..08dd18d5 100644 --- a/src/filters.h +++ b/src/filters.h @@ -813,19 +813,19 @@ public: } }; -class dow_posts : public subtotal_posts +class day_of_week_posts : public subtotal_posts { posts_list days_of_the_week[7]; - dow_posts(); + day_of_week_posts(); public: - dow_posts(post_handler_ptr handler, expr_t& amount_expr) + day_of_week_posts(post_handler_ptr handler, expr_t& amount_expr) : subtotal_posts(handler, amount_expr) { - TRACE_CTOR(dow_posts, "post_handler_ptr, bool"); + TRACE_CTOR(day_of_week_posts, "post_handler_ptr, bool"); } - virtual ~dow_posts() throw() { - TRACE_DTOR(dow_posts); + virtual ~day_of_week_posts() throw() { + TRACE_DTOR(day_of_week_posts); } virtual void flush(); @@ -882,14 +882,16 @@ class budget_posts : public generate_posts #define BUDGET_WRAP_VALUES 0x04 uint_least8_t flags; + date_t terminus; budget_posts(); public: budget_posts(post_handler_ptr handler, - uint_least8_t _flags = BUDGET_BUDGETED) - : generate_posts(handler), flags(_flags) { - TRACE_CTOR(budget_posts, "post_handler_ptr, uint_least8_t"); + date_t _terminus, + uint_least8_t _flags = BUDGET_BUDGETED) + : generate_posts(handler), flags(_flags), terminus(_terminus) { + TRACE_CTOR(budget_posts, "post_handler_ptr, date_t, uint_least8_t"); } virtual ~budget_posts() throw() { TRACE_DTOR(budget_posts); @@ -897,6 +899,7 @@ public: void report_budget_items(const date_t& date); + virtual void flush(); virtual void operator()(post_t& post); }; @@ -929,6 +932,26 @@ class forecast_posts : public generate_posts } }; +class inject_posts : public item_handler<post_t> +{ + typedef std::set<xact_t *> tag_injected_set; + typedef std::pair<account_t *, tag_injected_set> tag_mapping_pair; + typedef std::pair<string, tag_mapping_pair> tags_list_pair; + + std::list<tags_list_pair> tags_list; + temporaries_t temps; + + public: + inject_posts(post_handler_ptr handler, const string& tag_list, + account_t * master); + + virtual ~inject_posts() throw() { + TRACE_DTOR(inject_posts); + } + + virtual void operator()(post_t& post); +}; + ////////////////////////////////////////////////////////////////////// // // Account filters |