ledger/parser.h
John Wiegley 9039e728b2 All system headers (except Boost) now included through system.hh;
also, added support for pre-compiled headers since I'm now using a
centralized resource for system headers.
2008-04-13 03:38:31 -04:00

34 lines
629 B
C++

#ifndef _PARSER_H
#define _PARSER_H
#include "utils.h"
namespace ledger {
class account_t;
class journal_t;
class parser_t
{
public:
virtual ~parser_t() {}
virtual bool test(std::istream& in) const = 0;
virtual unsigned int parse(std::istream& in,
journal_t * journal,
account_t * master = NULL,
const string * original_file = NULL) = 0;
};
class parse_error : public error {
public:
parse_error(const string& _reason,
error_context * _ctxt = NULL) throw()
: error(_reason, _ctxt) {}
virtual ~parse_error() throw() {}
};
} // namespace ledger
#endif // _PARSER_H