diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-06 00:06:40 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-06 00:06:40 -0400 |
commit | c0205f02048594c4ad8b36f690aa9b0eb2f90753 (patch) | |
tree | 9769d39a26b10c27abf7045e12c04353e5117412 /format.h | |
parent | 6048ae7c05622a83355ad0a87ab1ce512f00b3f3 (diff) | |
download | fork-ledger-c0205f02048594c4ad8b36f690aa9b0eb2f90753.tar.gz fork-ledger-c0205f02048594c4ad8b36f690aa9b0eb2f90753.tar.bz2 fork-ledger-c0205f02048594c4ad8b36f690aa9b0eb2f90753.zip |
-s bal is functional again
Diffstat (limited to 'format.h')
-rw-r--r-- | format.h | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -82,6 +82,43 @@ struct format_t } }; +class format_transaction +{ + std::ostream& output_stream; + const format_t& first_line_format; + const format_t& next_lines_format; + const bool inverted; + unsigned int index; + entry_t * last_entry; + + public: + format_transaction(std::ostream& _output_stream, + const format_t& _first_line_format, + const format_t& _next_lines_format, + const bool _inverted) + : output_stream(_output_stream), + first_line_format(_first_line_format), + next_lines_format(_next_lines_format), + inverted(_inverted), index(0), last_entry(NULL) {} + + void operator()(transaction_t * xact); +}; + +class format_account +{ + std::ostream& output_stream; + const format_t& format; + const account_t * last_account; + + public: + format_account(std::ostream& _output_stream, const format_t& _format) + : output_stream(_output_stream), format(_format) {} + + void operator()(const account_t * account, + const unsigned int max_depth = 1, + const bool report_top = false); +}; + } // namespace ledger #endif // _REPORT_H |