Maps all the Debts to their source. More...
#include <DebtMap.h>
Public Member Functions | |
void | update (Debt updated) |
Changes the debt to the newly supplied one indexed by the source of the budgeted money. | |
![]() | |
BudgetedMoneyMap (std::map< BudgetSource, Debt > monies={}) | |
void | add (Debt added) |
Places the new budgeted money into the budgeted monies indexed by its source. | |
const_iterator | begin () const |
const_iterator | end () const |
bool | has (const BudgetSource &source) const |
Determines if a specific budgeted money exists within the budgeted monies. | |
std::strong_ordering | operator<=> (const BudgetedMoneyMap &other) const noexcept |
bool | operator== (const BudgetedMoneyMap &) const noexcept=default |
void | remove (const BudgetSource &source) |
Removes an budgeted money from the budgeted monies. | |
void | rename (const BudgetSource &original, BudgetSource changed) |
std::set< BudgetSource > | sources () const |
An accessor to all the known budgeted money sources. | |
pecunia::Money | total (const pecunia::Currency &code, const EventFrequency period) const |
Calculates the total amount of budgeted monies. | |
void | update (Debt updated) |
Changes the budgeted money to the newly supplied one indexed by the source of the budgeted money. When the new budgeted money is not in the same currency as the existing entry, the new budgeted money will replace the existing entry, i.e. no currency conversions will take place. | |
Maps all the Debts to their source.
void drn::budgeting::DebtMap::update | ( | Debt | updated | ) |
Changes the debt to the newly supplied one indexed by the source of the budgeted money.
BudgetItemError | When the supplied source source does not exist. |
BudgetItemError | When the amount borrowed is changed. |
updated | The new budgeted money to update the indexed entry to. |