summaryrefslogtreecommitdiff
path: root/csv.h
blob: 8ec9b350ed7877d9f1dd20fdd19fe88c4931c03b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _CSV_H
#define _CSV_H

#include "journal.h"
#include "format.h"

namespace ledger {

class format_csv_transactions : public item_handler<transaction_t>
{
  format_csv_transactions();

protected:
  std::ostream&	out;

public:
  format_csv_transactions(std::ostream& _out) : out(_out) {
    TRACE_CTOR(format_csv_transactions, "std::ostream&");
  }
  ~format_csv_transactions() {
    TRACE_DTOR(format_csv_transactions);
  }

  virtual void flush() {
    out.flush();
  }
  virtual void operator()(transaction_t& xact);
};

} // namespace ledger

#endif // _REPORT_H