summaryrefslogtreecommitdiff
path: root/balance.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-08 01:54:28 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-08 01:54:28 -0400
commit6cfdd704a919753e2e697935e27b80bbe53ae894 (patch)
tree2bbec814412acb654ac29001fa36e6b745e07f0c /balance.h
parenta4c5380a7f0abc2ab0bdc9347bba967a113ad696 (diff)
downloadfork-ledger-6cfdd704a919753e2e697935e27b80bbe53ae894.tar.gz
fork-ledger-6cfdd704a919753e2e697935e27b80bbe53ae894.tar.bz2
fork-ledger-6cfdd704a919753e2e697935e27b80bbe53ae894.zip
made value_t into a more complete type. amounts.py now works.
Diffstat (limited to 'balance.h')
-rw-r--r--balance.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/balance.h b/balance.h
index 0740ea59..e671192f 100644
--- a/balance.h
+++ b/balance.h
@@ -389,6 +389,11 @@ inline balance_t abs(const balance_t& bal) {
return temp;
}
+inline std::ostream& operator<<(std::ostream& out, const balance_t& bal) {
+ bal.write(out, 12);
+}
+
+
class balance_pair_t
{
public:
@@ -754,6 +759,11 @@ inline balance_pair_t abs(const balance_pair_t& bal_pair) {
return temp;
}
+inline std::ostream& operator<<(std::ostream& out,
+ const balance_pair_t& bal_pair) {
+ bal_pair.quantity.write(out, 12);
+}
+
} // namespace ledger
#endif // _BALANCE_H