diff options
Diffstat (limited to 'src/balance.h')
-rw-r--r-- | src/balance.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/balance.h b/src/balance.h index 8e773fc5..b9c9c2c8 100644 --- a/src/balance.h +++ b/src/balance.h @@ -81,6 +81,7 @@ class balance_t { public: typedef std::map<commodity_t *, amount_t> amounts_map; + typedef std::vector<const amount_t *> amounts_array; amounts_map amounts; @@ -529,6 +530,12 @@ public: balance_t strip_annotations(const keep_details_t& what_to_keep) const; /** + * Given a balance, insert a commodity-wise sort of the amounts into the + * given amounts_array. + */ + void sorted_amounts(amounts_array& sorted) 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 |