summaryrefslogtreecommitdiff
path: root/src/balance.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-23 16:46:11 -0500
committerJohn Wiegley <johnw@newartisans.com>2012-03-23 16:46:11 -0500
commit4b057599626538a0d1463c63f2110d2fe5baa2e6 (patch)
tree1934a6b1bd6c47ff3599c9aaaeb211fb2303c86f /src/balance.h
parent38813bc635e587f0979ef142511c5e7655fd88f1 (diff)
downloadfork-ledger-4b057599626538a0d1463c63f2110d2fe5baa2e6.tar.gz
fork-ledger-4b057599626538a0d1463c63f2110d2fe5baa2e6.tar.bz2
fork-ledger-4b057599626538a0d1463c63f2110d2fe5baa2e6.zip
Fixed sorting of equity output
Diffstat (limited to 'src/balance.h')
-rw-r--r--src/balance.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/balance.h b/src/balance.h
index 11c370bb..704b4072 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -507,6 +507,14 @@ public:
balance_t strip_annotations(const keep_details_t& what_to_keep) const;
/**
+ * Iteration primitives. `map_sorted_amounts' allows one to visit
+ * each amount in balance in the proper order for displaying to the
+ * user. Mostly used by `print' and other routinse where the sort
+ * order of the amounts' commodities is significant.
+ */
+ void map_sorted_amounts(function<void(const amount_t&)> fn) const;
+
+ /**
* Printing methods. A balance may be output to a stream using the
* `print' method. There is also a global operator<< defined which
* simply calls print for a balance on the given stream. There is