diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-07 17:45:48 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-07 17:45:48 -0400 |
commit | 589eabd8e60636b7b250b75a5a2966034e8ba911 (patch) | |
tree | f9db5c14df14dbc2db3ba0c96dff34c8e670a311 /src/journal.h | |
parent | 9380d73646bcd79c4f24581b2212f684cea70138 (diff) | |
download | fork-ledger-589eabd8e60636b7b250b75a5a2966034e8ba911.tar.gz fork-ledger-589eabd8e60636b7b250b75a5a2966034e8ba911.tar.bz2 fork-ledger-589eabd8e60636b7b250b75a5a2966034e8ba911.zip |
Threw away the "multiple parser" infrastructure.
Diffstat (limited to 'src/journal.h')
-rw-r--r-- | src/journal.h | 43 |
1 files changed, 9 insertions, 34 deletions
diff --git a/src/journal.h b/src/journal.h index 1b5607cc..b84f3448 100644 --- a/src/journal.h +++ b/src/journal.h @@ -65,14 +65,12 @@ class account_t; class journal_t : public noncopyable { public: - account_t * master; - account_t * basket; - entries_list entries; - paths_list sources; - optional<path> price_db; + account_t * master; + account_t * basket; + entries_list entries; - auto_entries_list auto_entries; - period_entries_list period_entries; + auto_entries_list auto_entries; + period_entries_list period_entries; hooks_t<entry_finalizer_t, entry_t> entry_finalize_hooks; @@ -98,33 +96,10 @@ public: entry_finalize_hooks.remove_hook(finalizer); } - /** - * @brief Provides an abstract interface for writing journal parsers. - * - * Any data format for Ledger data is possible, as long as it can be parsed - * into a journal_t data tree. This class provides the basic interface which - * must be implemented by every such journal parser. - */ - class parser_t : public noncopyable - { - public: - parser_t() { - TRACE_CTOR(journal_t::parser_t, ""); - } - virtual ~parser_t() { - TRACE_DTOR(journal_t::parser_t); - } - -#if defined(TEST_FOR_PARSER) - virtual bool test(std::istream& in) const = 0; -#endif - - virtual std::size_t parse(std::istream& in, - session_t& session, - journal_t& journal, - account_t * master = NULL, - const path * original_file = NULL) = 0; - }; + std::size_t parse(std::istream& in, + session_t& session, + account_t * master, + const path * original_file); bool valid() const; }; |