Loading...
Searching...
No Matches
balance.h File Reference

Basic type for adding multiple commodities together. More...

#include "amount.h"
+ Include dependency graph for balance.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ledger::balance_error
 
class  ledger::balance_t
 A wrapper around amount_t allowing addition of multiple commodities. More...
 

Namespaces

namespace  ledger
 

Functions

balance_t ledger::average_lot_prices (const balance_t &bal)
 
std::ostream & ledger::operator<< (std::ostream &out, const balance_t &bal)
 
void ledger::put_balance (property_tree::ptree &pt, const balance_t &bal)
 

Detailed Description

Basic type for adding multiple commodities together.

Author
John Wiegley

Unlike the amount_t class, which throws an exception if amounts of differing commodities are added or subtracted, the balance_t class is designed to allow this, tracking the amounts of each component commodity separately.

Definition in file balance.h.