DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::budgeting::Debt Class Referencefinal

The representation of an amount of money that is borrowed and how often it occurs. More...

#include <Debt.h>

Inheritance diagram for drn::budgeting::Debt:
Collaboration diagram for drn::budgeting::Debt:

Public Member Functions

 Debt ()
 Constructs all member variables to their empty state.
 
 Debt (const BudgetSource &source)
 
 Debt (const BudgetSource &source, const pecunia::Money &minimum, const EventFrequency &period, const ::QDate &nextOccurOn, const pecunia::Money &borrowed, const foundation::Percentage &interest)
 Fully initialises all member variables to their supplied values.
 
const pecunia::Money & borrowed () const
 The total amount of money borrowed.
 
const foundation::Percentageinterest () const
 The current interest rate for the debt.
 
std::strong_ordering operator<=> (const Debt &other) const noexcept
 
bool operator== (const Debt &other) const noexcept=default
 
- Public Member Functions inherited from drn::budgeting::BudgetedMoney
 BudgetedMoney ()
 Constructs all member variables to their empty state.
 
 BudgetedMoney (BudgetedMoney &&) noexcept=default
 
 BudgetedMoney (BudgetSource source)
 Constructs all member variables to their empty state apart from the source.
 
 BudgetedMoney (BudgetSource source, pecunia::Money amount, const EventFrequency &period, const ::QDate &nextOccurOn)
 Fully initialises all member variables to their supplied values.
 
 BudgetedMoney (const BudgetedMoney &)=default
 
virtual ~BudgetedMoney ()=default
 
const pecunia::Money & amount () const noexcept
 The amount expected per period for the money.
 
const ::QDate & nextOccurOn () const noexcept
 The date the budgeted money item occurs on next.
 
bool operator!= (const BudgetedMoney &other) const
 Inequality operator compares all members.
 
std::strong_ordering operator<=> (const BudgetedMoney &) const noexcept=default
 
BudgetedMoneyoperator= (BudgetedMoney &&) noexcept=default
 
BudgetedMoneyoperator= (const BudgetedMoney &)=default
 
bool operator== (const BudgetedMoney &other) const
 Equality operator compares all members.
 
const EventFrequencyperiod () const noexcept
 The frequency at which the money event occurs.
 
void rename (BudgetSource source)
 Changes the source of the money.
 
const BudgetSourcesource () const noexcept
 The identifier of the source for the money.
 
void updateNextOccurOn ()
 Updates the next occur on date by the event frequency period.
 

Detailed Description

The representation of an amount of money that is borrowed and how often it occurs.

Constructor & Destructor Documentation

◆ Debt() [1/3]

drn::budgeting::Debt::Debt ( )

Constructs all member variables to their empty state.

Here is the caller graph for this function:

◆ Debt() [2/3]

drn::budgeting::Debt::Debt ( const BudgetSource & source)
explicit
Here is the call graph for this function:

◆ Debt() [3/3]

drn::budgeting::Debt::Debt ( const BudgetSource & source,
const pecunia::Money & minimum,
const EventFrequency & period,
const ::QDate & nextOccurOn,
const pecunia::Money & borrowed,
const foundation::Percentage & interest )

Fully initialises all member variables to their supplied values.

Exceptions
BudgetItemErrorWhen the source is empty.
BudgetItemErrorWhen the borrowed is less then zero.
BudgetItemErrorWhen the borrowed is not issued in a known currency.
BudgetItemErrorWhen the borrowed is less then the minimum payment.
BudgetItemErrorWhen the period is not known.
BudgetItemErrorWhen the minimum is less than zero.
BudgetItemErrorWhen the minimum is not issued in a known currency.
BudgetItemErrorWhen the interest rate is less than zero.
BudgetItemErrorWhen the next occur date is invalid.
Parameters
sourceThe source of the debt.
minimumThe minimum payment required per payment period.
periodThe frequency period of payment for the debt source.
nextOccurOnThe date the money budget item last occurred on.
interestThe interest rate applied to the borrowed amount.
borrowedThe total amount of money borrowed from the debt source.
Here is the call graph for this function:

Member Function Documentation

◆ borrowed()

const pecunia::Money & drn::budgeting::Debt::borrowed ( ) const

The total amount of money borrowed.

Here is the caller graph for this function:

◆ interest()

const foundation::Percentage & drn::budgeting::Debt::interest ( ) const

The current interest rate for the debt.

Here is the caller graph for this function:

◆ operator<=>()

std::strong_ordering drn::budgeting::Debt::operator<=> ( const Debt & other) const
nodiscardnoexcept
Here is the call graph for this function:

◆ operator==()

bool drn::budgeting::Debt::operator== ( const Debt & other) const
nodiscarddefaultnoexcept
Here is the call graph for this function: