diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-27 23:38:39 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-27 23:38:39 -0400 |
commit | 16841fbae3adcb0a143d709e2597ce543bff084e (patch) | |
tree | 9683e8e1b4442b99e2d7f2e26cf409c89c0f10a6 /parser.h | |
parent | f0238fdd065ace9edbb65a45875f2f47a7a932d6 (diff) | |
download | fork-ledger-16841fbae3adcb0a143d709e2597ce543bff084e.tar.gz fork-ledger-16841fbae3adcb0a143d709e2597ce543bff084e.tar.bz2 fork-ledger-16841fbae3adcb0a143d709e2597ce543bff084e.zip |
added (disabled) code for Boost.Python
Diffstat (limited to 'parser.h')
-rw-r--r-- | parser.h | 25 |
1 files changed, 16 insertions, 9 deletions
@@ -1,12 +1,13 @@ #ifndef _PARSER_H #define _PARSER_H -#include "ledger.h" +#include <iostream> +#include <string> namespace ledger { -class parser_t; -typedef std::list<parser_t *> 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 |