From 16841fbae3adcb0a143d709e2597ce543bff084e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 27 Aug 2004 23:38:39 -0400 Subject: added (disabled) code for Boost.Python --- parser.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'parser.h') diff --git a/parser.h b/parser.h index 19ceb35a..515bf09b 100644 --- a/parser.h +++ b/parser.h @@ -1,12 +1,13 @@ #ifndef _PARSER_H #define _PARSER_H -#include "ledger.h" +#include +#include namespace ledger { -class parser_t; -typedef std::list parsers_list; +class account_t; +class journal_t; class parser_t { @@ -19,14 +20,20 @@ class parser_t journal_t * journal, account_t * master = NULL, const std::string * original_file = NULL) = 0; +}; - static parsers_list parsers; +bool register_parser(parser_t * parser); +bool unregister_parser(parser_t * parser); - static unsigned int parse_file(const std::string& path, - journal_t * journal, - account_t * master = NULL, - const std::string * original_file = NULL); -}; +unsigned int parse_journal(std::istream& in, + journal_t * journal, + account_t * master = NULL, + const std::string * original_file = NULL); + +unsigned int parse_journal_file(const std::string& path, + journal_t * journal, + account_t * master = NULL, + const std::string * original_file = NULL); } // namespace ledger -- cgit v1.2.3