OSB_LIB::BsTotal Class Reference

Collaboration diagram for OSB_LIB::BsTotal:

Collaboration graph
[legend]
List of all members.

Detailed Description

List of charges applicable to a balance page.

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.

Public Types

Public Member Functions

Wrappers to the charge list for browsing:
Note to developers: Add members as needed but make sure they are const!

Private Member Functions

Non-const wrappers to the charge list:

Private Attributes

Friends

Classes


Member Typedef Documentation

typedef std::map<Currency::Oid, SubTotal> OSB_LIB::BsTotal::List

STL container used to store the totals per currency.

Definition at line 295 of file balancesheet.h.


Member Function Documentation

void OSB_LIB::BsTotal::add ( const std::vector< ChargeDetail > &  cd  )  [private]

Add charge details from a used service.

Parameters:
cd The charge details to add.

List::const_iterator OSB_LIB::BsTotal::begin (  )  const [inline]

Iterator to the first entry.

Definition at line 308 of file balancesheet.h.

References list_.

void OSB_LIB::BsTotal::clear (  )  [inline, private]

Clear the list of subtotals.

Definition at line 328 of file balancesheet.h.

References list_.

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_.

BsTotal& OSB_LIB::BsTotal::operator+= ( const BsTotal rhs  ) 

Add two lists.

SubTotal& OSB_LIB::BsTotal::operator[] ( const Currency::Oid cc  )  [private]

Get subtotal for a currency code.

Parameters:
cc Currency code of the subtotal to retrieve.
Returns:
The related subtotal, its currency code is is set to cc.

void OSB_LIB::BsTotal::resetCurrentCharges (  )  [private]

Clear charges read from database.

Set all current charges in list_ to 0.

Note:
The function does not discard uncommited charges in the subtotals.

List::size_type OSB_LIB::BsTotal::size (  )  const [inline]

Number of entries in the list.

Definition at line 306 of file balancesheet.h.

References list_.

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_


Friends And Related Function Documentation

friend class BsPage [friend]

Only BsPage is allowed to modify charges.

Definition at line 256 of file balancesheet.h.

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.


Member Data Documentation

List OSB_LIB::BsTotal::list_ [private]

The list of charges per currency.

Definition at line 360 of file balancesheet.h.

Referenced by begin(), clear(), end(), list(), and size().


The documentation for this class was generated from the following file:
Generated on Sat Sep 2 14:09:29 2006 for OSB Library by  doxygen 1.4.7