DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
Loading...
Searching...
No Matches
drn::budgeting::Wage Struct Referencefinal

Represents a recurring stream of monetary income, including its periodicity and amount. More...

#include <Wage.hpp>

Inheritance diagram for drn::budgeting::Wage:
Collaboration diagram for drn::budgeting::Wage:

Public Member Functions

 Wage (const Wage &other)
 Complete copy constructor.
 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
std::unique_ptr< BudgetedMoneyclone () const override
 Creates a unique copy of the current instance.
Wageoperator= (const Wage &other)
 Complete copy assignment 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.
BudgetedMoneyoperator= (BudgetedMoney &&) noexcept=default
BudgetedMoneyoperator= (const BudgetedMoney &)=delete
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.
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.

Detailed Description

Represents a recurring stream of monetary income, including its periodicity and amount.

This class is intended to model a scheduled income, such as a net wage or salary, that occurs over regular intervals. It allows handling of monetary value and tracking its frequency for financial calculations or planning.

Constructor & Destructor Documentation

◆ Wage()

drn::budgeting::Wage::Wage ( const Wage & other)

Complete copy constructor.

Parameters
otherThe instance to copy.
Postcondition
The current instance is a deep copy of the other instance.
Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ BudgetedMoney() [1/5]

drn::budgeting::BudgetedMoney::BudgetedMoney ( )

Constructs all member variables to their empty state.

◆ BudgetedMoney() [2/5]

drn::budgeting::BudgetedMoney::BudgetedMoney ( BudgetedMoney && )
defaultnoexcept

◆ BudgetedMoney() [3/5]

drn::budgeting::BudgetedMoney::BudgetedMoney ( BudgetSource source)
explicit

Constructs all member variables to their empty state apart from the source.

Exceptions
BudgetItemErrorWhen the source is empty.
Parameters
sourceThe source of the money budget item.

◆ BudgetedMoney() [4/5]

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

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.

◆ BudgetedMoney() [5/5]

drn::budgeting::BudgetedMoney::BudgetedMoney ( const BudgetedMoney & )
delete

◆ clone()

std::unique_ptr< BudgetedMoney > drn::budgeting::Wage::clone ( ) const
nodiscardoverridevirtual

Creates a unique copy of the current instance.

Returns
The cloned instance of the object.

Implements drn::foundation::RequireClonable< BudgetedMoney >.

◆ operator=()

Wage & drn::budgeting::Wage::operator= ( const Wage & other)

Complete copy assignment operator.

Parameters
otherThe instance to copy
Postcondition
The current instance is a deep copy of the other instance.
Returns
The modified instance.
Here is the call graph for this function: