This class contains the total charges applicable to the balance page or sheet: grouped by currency code, usage, onetime and advance charges.
The class is mainly a wrapper to a list of SubTotal and at the same time provides some supporting functions for BsPage.
Definition at line 252 of file balancesheet.h.
typedef std::map<Currency::Oid, SubTotal> OSB_LIB::BsTotal::List |
void OSB_LIB::BsTotal::add | ( | const std::vector< ChargeDetail > & | cd | ) | [private] |
Add charge details from a used service.
cd | The charge details to add. |
List::const_iterator OSB_LIB::BsTotal::begin | ( | ) | const [inline] |
void OSB_LIB::BsTotal::clear | ( | ) | [inline, private] |
List::const_iterator OSB_LIB::BsTotal::end | ( | ) | const [inline] |
Iterator to end of the charge list.
Definition at line 310 of file balancesheet.h.
References list_.
const List& OSB_LIB::BsTotal::list | ( | ) | const [inline] |
Read access to the whole list of charges.
Definition at line 304 of file balancesheet.h.
References list_.
SubTotal& OSB_LIB::BsTotal::operator[] | ( | const Currency::Oid & | cc | ) | [private] |
Get subtotal for a currency code.
cc | Currency code of the subtotal to retrieve. |
void OSB_LIB::BsTotal::resetCurrentCharges | ( | ) | [private] |
Clear charges read from database.
Set all current charges in list_ to 0.
List::size_type OSB_LIB::BsTotal::size | ( | ) | const [inline] |
void OSB_LIB::BsTotal::substractCurrentUsage | ( | ) | [private] |
Substract the current usage charges.
Substracts the current usage of each subtotal from the changed usage, the current usage remains unchanged:
SubTotal::deltaUsg_ -= SubTotal::curUsg_
friend class BsPage [friend] |
friend struct OSB_DB::BalanceSheetGw [friend] |
The gateway needs to populate list_ when reading the charges of a page.
Definition at line 262 of file balancesheet.h.
List OSB_LIB::BsTotal::list_ [private] |