|
DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
|
The representation of an amount of money that is borrowed and how often it occurs. More...
#include <Debt.hpp>
Public Member Functions | |
| Debt () | |
| Constructs all member variables to their empty state. | |
| Debt (const BudgetSource &source) | |
| Partially initialises the debt to be based upon a source and defaulting the rest. | |
| 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. | |
| Debt (const Debt &other) | |
| Complete copy constructor. | |
| const pecunia::Money & | borrowed () const |
| The total amount of money borrowed. | |
| std::unique_ptr< BudgetedMoney > | clone () const override |
| Creates a unique copy of the current instance. | |
| const foundation::Percentage & | interest () const |
| The current interest rate for the debt. | |
| std::strong_ordering | operator<=> (const Debt &other) const noexcept |
| Determines the ordering relationship between two debt budget items. | |
| Debt & | operator= (const Debt &other) |
| Complete copy assignment operator. | |
| bool | operator== (const Debt &other) const noexcept |
| Full equality operator. | |
| 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 &)=delete | |
| ~BudgetedMoney () override=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 &other) const noexcept |
| Compares the current instance with another instance. | |
| BudgetedMoney & | operator= (BudgetedMoney &&) noexcept=default |
| BudgetedMoney & | operator= (const BudgetedMoney &)=delete |
| bool | operator== (const BudgetedMoney &other) const |
| Equality operator compares all members. | |
| const EventFrequency & | period () const noexcept |
| The frequency at which the money event occurs. | |
| void | rename (BudgetSource source) |
| Changes the source of the money. | |
| const BudgetSource & | source () const noexcept |
| The identifier of the source for the money. | |
| void | updateNextOccurOn () |
| Updates the next occur on date by the event frequency period. | |
| Public Member Functions inherited from drn::foundation::RequireClonable< BudgetedMoney > | |
| virtual | ~RequireClonable ()=default |
Additional Inherited Members | |
| Protected Member Functions inherited from drn::budgeting::BudgetedMoney | |
| void | assign (const BudgetedMoney &other) |
| Assigns the values from another BudgetedMoney instance to the current instance. | |
The representation of an amount of money that is borrowed and how often it occurs.
| drn::budgeting::Debt::Debt | ( | ) |
Constructs all member variables to their empty state.
|
explicit |
Partially initialises the debt to be based upon a source and defaulting the rest.
| 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.
| BudgetItemError | When the source is empty. |
| BudgetItemError | When the borrowed is less then zero. |
| BudgetItemError | When the borrowed is not issued in a known currency. |
| BudgetItemError | When the borrowed is less then the minimum payment. |
| BudgetItemError | When the period is not known. |
| BudgetItemError | When the minimum is less than zero. |
| BudgetItemError | When the minimum is not issued in a known currency. |
| BudgetItemError | When the interest rate is less than zero. |
| BudgetItemError | When the next occur date is invalid. |
| source | The source of the debt. |
| minimum | The minimum payment required per payment period. |
| period | The frequency period of payment for the debt source. |
| nextOccurOn | The date the money budget item last occurred on. |
| interest | The interest rate applied to the borrowed amount. |
| borrowed | The total amount of money borrowed from the debt source. |
| drn::budgeting::Debt::Debt | ( | const Debt & | other | ) |
Complete copy constructor.
| other | The instance to copy. |
|
nodiscard |
The total amount of money borrowed.
|
nodiscardoverridevirtual |
Creates a unique copy of the current instance.
Implements drn::foundation::RequireClonable< BudgetedMoney >.
|
nodiscard |
The current interest rate for the debt.
|
nodiscardnoexcept |
Determines the ordering relationship between two debt budget items.
| other | The other debt budget item to compare against. |
Complete copy assignment operator.
| other | The instance to copy |
|
nodiscardnoexcept |
Full equality operator.
| other | The other instance to compare for equality. |