From 3e72a51dc3d296c9f647efaf4cbfbbdcf4bf6df1 Mon Sep 17 00:00:00 2001 From: Craig Earls Date: Tue, 29 Jan 2013 09:42:10 -0700 Subject: Addes tags command and --values option Tags command reports all metadat tags in use. With the values option it reports tags and their values. --- src/output.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/output.h') 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 +{ +protected: + report_t& report; + + std::map tags; + + typedef std::map::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::clear(); + } +}; + + class report_commodities : public item_handler { protected: -- cgit v1.2.3