diff options
author | John Wiegley <johnw@newartisans.com> | 2009-03-04 23:53:43 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-03-04 23:53:43 -0400 |
commit | c11d32571246e51f401deee88f4ebd752b467fdc (patch) | |
tree | ccfe6c759d1f2f46a501495eeedecc8c679865d7 /src/balance.cc | |
parent | 9a47298d811496816903515bdba7652e275cc32a (diff) | |
download | fork-ledger-c11d32571246e51f401deee88f4ebd752b467fdc.tar.gz fork-ledger-c11d32571246e51f401deee88f4ebd752b467fdc.tar.bz2 fork-ledger-c11d32571246e51f401deee88f4ebd752b467fdc.zip |
Reduced the #include dependency tree to a minimum
Diffstat (limited to 'src/balance.cc')
-rw-r--r-- | src/balance.cc | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/balance.cc b/src/balance.cc index 1b343fb7..366eb7a7 100644 --- a/src/balance.cc +++ b/src/balance.cc @@ -30,10 +30,32 @@ */ #include "balance.h" -#include "unistring.h" +#include "commodity.h" +#include "unistring.h" // for justify() namespace ledger { +balance_t::balance_t(const double val) +{ + TRACE_CTOR(balance_t, "const double"); + amounts.insert + (amounts_map::value_type(amount_t::current_pool->null_commodity, val)); +} + +balance_t::balance_t(const unsigned long val) +{ + TRACE_CTOR(balance_t, "const unsigned long"); + amounts.insert + (amounts_map::value_type(amount_t::current_pool->null_commodity, val)); +} + +balance_t::balance_t(const long val) +{ + TRACE_CTOR(balance_t, "const long"); + amounts.insert + (amounts_map::value_type(amount_t::current_pool->null_commodity, val)); +} + balance_t& balance_t::operator+=(const balance_t& bal) { foreach (const amounts_map::value_type& pair, bal.amounts) |