blob: 3ced34324972cf0f5607d5d2091ec27b6b86e802 (
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
|
#ifndef _PARSER_H
#define _PARSER_H
#include "ledger.h"
namespace ledger {
class parser_t;
typedef std::list<parser_t *> parsers_list;
class parser_t
{
public:
virtual bool test(std::istream& in) const = 0;
virtual unsigned int parse(std::istream& in,
journal_t * journal,
account_t * master = NULL,
const std::string * original_file = NULL) = 0;
static parsers_list parsers;
static unsigned int parse_file(const std::string& path,
journal_t * journal,
account_t * master = NULL,
const std::string * original_file = NULL);
};
} // namespace ledger
#endif // _PARSER_H
|