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

The representation of an amount of money that set aside each period for a particular usage. More...

#include <Goal.h>

Inheritance diagram for drn::budgeting::Goal:
Collaboration diagram for drn::budgeting::Goal:

Public Member Functions

 Goal ()=default
 
 Goal (const BudgetSource &source)
 Minimum initialisation constructor.
 
 Goal (const BudgetSource &source, const pecunia::Money &amount, const EventFrequency &period, const ::QDate &nextOccurOn, const pecunia::Money &final)
 Fully initialises all member variables to their supplied values.
 
const pecunia::Money & final () const
 The final amount of money the goal is completed at.
 
std::strong_ordering operator<=> (const Goal &other) const noexcept
 
bool operator== (const Goal &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 set aside each period for a particular usage.

Constructor & Destructor Documentation

◆ Goal() [1/3]

drn::budgeting::Goal::Goal ( )
default
Here is the caller graph for this function:

◆ Goal() [2/3]

drn::budgeting::Goal::Goal ( const BudgetSource & source)
explicit

Minimum initialisation constructor.

It initializes the internal data to represent a specific goal that aligns with the properties of the provided budget source. This should be used to create an instance representing a focused financial target derived from a specific source. The associated source allows for tracking and manipulation based on the user's budgeting decisions.

Parameters
sourceThe budget source from which the goal is derived.
Here is the call graph for this function:

◆ Goal() [3/3]

drn::budgeting::Goal::Goal ( const BudgetSource & source,
const pecunia::Money & amount,
const EventFrequency & period,
const ::QDate & nextOccurOn,
const pecunia::Money & final )

Fully initialises all member variables to their supplied values.

Exceptions
BudgetItemErrorWhen the source is empty.
BudgetItemErrorWhen the amount is less then zero.
BudgetItemErrorWhen the amount is not issued in a known currency.
BudgetItemErrorWhen the period is not known.
BudgetItemErrorWhen the next occur date is invalid.
Parameters
sourceThe source of the money budget item.
amountThe amount the money is for every period.
periodThe frequency period of the event for the money.
nextOccurOnThe date the money budget item last occurred on.
finalThe final amount of money the goal is completed at.
Here is the call graph for this function:

Member Function Documentation

◆ final()

const pecunia::Money & drn::budgeting::Goal::final ( ) const

The final amount of money the goal is completed at.

◆ operator<=>()

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

◆ operator==()

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