diff options
author | John Wiegley <johnw@newartisans.com> | 2012-05-18 01:38:39 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-05-18 01:38:39 -0600 |
commit | 7e8ba51cd0fc94776b8f687736202a25ddc39f15 (patch) | |
tree | 373ec4d59af7a14d3519f0c18063e61e41cf8ec9 /src/ptree.h | |
parent | a38ed141c1f33ecdad99b322acb1ae07b30a5da2 (diff) | |
download | fork-ledger-7e8ba51cd0fc94776b8f687736202a25ddc39f15.tar.gz fork-ledger-7e8ba51cd0fc94776b8f687736202a25ddc39f15.tar.bz2 fork-ledger-7e8ba51cd0fc94776b8f687736202a25ddc39f15.zip |
Added a "json" report command
Diffstat (limited to 'src/ptree.h')
-rw-r--r-- | src/ptree.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/ptree.h b/src/ptree.h index d3fecc88..b28f97d5 100644 --- a/src/ptree.h +++ b/src/ptree.h @@ -74,8 +74,14 @@ protected: std::deque<xact_t *> transactions; public: - format_ptree(report_t& _report) : report(_report) { - TRACE_CTOR(format_ptree, "report&"); + enum format_t { + FORMAT_XML, + FORMAT_JSON + } format; + + format_ptree(report_t& _report, format_t _format = FORMAT_XML) + : report(_report), format(_format) { + TRACE_CTOR(format_ptree, "report&, format_t"); } virtual ~format_ptree() { TRACE_DTOR(format_ptree); |