summaryrefslogtreecommitdiff
path: root/ledger.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2003-10-11 22:59:43 +0000
committerJohn Wiegley <johnw@newartisans.com>2003-10-11 22:59:43 +0000
commit854b719f1ec704a7a84bee629bc759b25d19ca6f (patch)
tree14602d9d63c0ab5bb944f1e82ed84e4ac884f8b6 /ledger.h
parent7ebe72c054575af9771644c8164ef7be7e52e388 (diff)
downloadfork-ledger-854b719f1ec704a7a84bee629bc759b25d19ca6f.tar.gz
fork-ledger-854b719f1ec704a7a84bee629bc759b25d19ca6f.tar.bz2
fork-ledger-854b719f1ec704a7a84bee629bc759b25d19ca6f.zip
c
Diffstat (limited to 'ledger.h')
-rw-r--r--ledger.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/ledger.h b/ledger.h
index b7fe5e06..8e917447 100644
--- a/ledger.h
+++ b/ledger.h
@@ -1,5 +1,5 @@
#ifndef _LEDGER_H
-#define _LEDGER_H "$Revision: 1.25 $"
+#define _LEDGER_H "$Revision: 1.26 $"
//////////////////////////////////////////////////////////////////////
//
@@ -66,6 +66,8 @@ class amount
virtual ~amount() {}
virtual commodity * commdty() const = 0;
+ virtual void set_commdty(commodity *) = 0;
+
virtual amount * copy() const = 0;
virtual amount * value(amount * pr = NULL) const = 0;
virtual amount * street(bool get_quotes) const = 0;
@@ -179,6 +181,7 @@ class entry
bool matches(const regexps_map& regexps) const;
bool validate(bool show_unaccounted = false) const;
+ bool finalize(bool do_compute = false);
void print(std::ostream& out, bool shortcut = true) const;
};
@@ -189,9 +192,10 @@ struct cmp_entry_date {
}
};
-typedef std::vector<entry *> entries_list;
-typedef entries_list::iterator entries_list_iterator;
-typedef entries_list::const_iterator entries_list_const_iterator;
+typedef std::vector<entry *> entries_list;
+typedef entries_list::iterator entries_list_iterator;
+typedef entries_list::reverse_iterator entries_list_reverse_iterator;
+typedef entries_list::const_iterator entries_list_const_iterator;
class totals
@@ -280,6 +284,7 @@ class book
}
void print(std::ostream& out, regexps_map& regexps, bool shortcut) const;
+ account * re_find_account(const std::string& regex);
account * find_account(const std::string& name, bool create = true);
};