DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
Loading...
Searching...
No Matches
drn::surveying::BalanceChange Struct Reference

A representation of a balance change for an account. More...

#include <MappingSurvey.hpp>

Collaboration diagram for drn::surveying::BalanceChange:

Public Member Functions

bool operator!= (const BalanceChange &) const =default
std::strong_ordering operator<=> (const BalanceChange &other) const noexcept
 Performs a comparison based on the transaction and isIncrease value.
bool operator== (const BalanceChange &) const =default

Public Attributes

bool isIncrease_ {}
 A flag, when true, indicates that the transaction is a balance increase for the account.
accounting::Transaction transaction_ {}
 The transaction responsible for the account balance change.

Detailed Description

A representation of a balance change for an account.

Member Function Documentation

◆ operator!=()

bool drn::surveying::BalanceChange::operator!= ( const BalanceChange & ) const
nodiscarddefault

◆ operator<=>()

std::strong_ordering drn::surveying::BalanceChange::operator<=> ( const BalanceChange & other) const
nodiscardnoexcept

Performs a comparison based on the transaction and isIncrease value.

Parameters
otherThe other object to compare with.
Returns
Returns strong_ordering::less if this object's transaction is less than the other object, strong_ordering::equal if the transaction and increase flag are equal, and strong_ordering::greater if this object is greater than the other object.

◆ operator==()

bool drn::surveying::BalanceChange::operator== ( const BalanceChange & ) const
nodiscarddefault

Member Data Documentation

◆ isIncrease_

bool drn::surveying::BalanceChange::isIncrease_ {}

A flag, when true, indicates that the transaction is a balance increase for the account.

◆ transaction_

accounting::Transaction drn::surveying::BalanceChange::transaction_ {}

The transaction responsible for the account balance change.