summaryrefslogtreecommitdiff
path: root/src/output.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2013-01-29 09:35:02 -0800
committerJohn Wiegley <johnw@newartisans.com>2013-01-29 09:35:02 -0800
commit69001d927afd1fa8fa4ed121591505e34d253c04 (patch)
tree200c676f6111f60f2eca16e1b6b75a4b992bdd10 /src/output.h
parent0e91b174b5fabbd1b0e192522c0be66cf7f755e7 (diff)
parent3e72a51dc3d296c9f647efaf4cbfbbdcf4bf6df1 (diff)
downloadfork-ledger-69001d927afd1fa8fa4ed121591505e34d253c04.tar.gz
fork-ledger-69001d927afd1fa8fa4ed121591505e34d253c04.tar.bz2
fork-ledger-69001d927afd1fa8fa4ed121591505e34d253c04.zip
Merge pull request #131 from enderw88/add-tags-command
Addes tags command and --values option
Diffstat (limited to 'src/output.h')
-rw-r--r--src/output.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/output.h b/src/output.h
index 281f69b6..9895cb44 100644
--- a/src/output.h
+++ b/src/output.h
@@ -189,6 +189,33 @@ public:
}
};
+class report_tags : public item_handler<post_t>
+{
+protected:
+ report_t& report;
+
+ std::map<string, std::size_t> tags;
+
+ typedef std::map<string, std::size_t>::value_type tags_pair;
+
+public:
+ report_tags(report_t& _report) : report(_report) {
+ TRACE_CTOR(report_tags, "report&");
+ }
+ virtual ~report_tags() {
+ TRACE_DTOR(report_tags);
+ }
+
+ virtual void flush();
+ virtual void operator()(post_t& post);
+
+ virtual void clear() {
+ tags.clear();
+ item_handler<post_t>::clear();
+ }
+};
+
+
class report_commodities : public item_handler<post_t>
{
protected: