summaryrefslogtreecommitdiff
path: root/parser.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-27 23:38:39 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-27 23:38:39 -0400
commit16841fbae3adcb0a143d709e2597ce543bff084e (patch)
tree9683e8e1b4442b99e2d7f2e26cf409c89c0f10a6 /parser.h
parentf0238fdd065ace9edbb65a45875f2f47a7a932d6 (diff)
downloadfork-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.h25
1 files changed, 16 insertions, 9 deletions
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 <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