DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::surveying::MappingSurvey Class Reference

A representation of a survey account mapping before being completed. More...

#include <MappingSurvey.h>

Collaboration diagram for drn::surveying::MappingSurvey:

Public Member Functions

 MappingSurvey ()=default
 
 MappingSurvey (banking::ReconciledBankAccount reconciled, pecunia::Money expectedBalance, ::QDate calculatedFrom, std::map< budgeting::BudgetItemIdentifier, std::set< BalanceChange > > used, std::map< budgeting::BudgetItemIdentifier, DistributedAmount > distributable, std::map< accounting::AccountCode, std::set< BalanceChange > > additional, std::optional< pecunia::Money > remainingExpenses)
 Constructs a survey that fully constructs the object.
 
 MappingSurvey (const MappingSurvey &other)
 
 MappingSurvey (MappingSurvey &&other) noexcept
 
 ~MappingSurvey ()=default
 
const std::map< accounting::AccountCode, std::set< BalanceChange > > & additional () const noexcept
 An accessor to any additional transactions involving the bank account but not a budget item, e.g. an opening balance, paying budget items using child accounts, etc.
 
const ::QDate & calculatedFrom () const noexcept
 An accessor to the date the expected balance of the bank account is calculated from.
 
const std::map< budgeting::BudgetItemIdentifier, DistributedAmount > & distributable () const noexcept
 An accessor to the predicted way the expected balance could be distributable throughout the budget.
 
const pecunia::Money & expectedBalance () const noexcept
 An accessor to the balance of the bank account calculated from the budget information. N.B. this may, and often is, different that the reconciled balance from a bank statement.
 
MappingSurveyoperator= (const MappingSurvey &other)
 
MappingSurveyoperator= (MappingSurvey &&other) noexcept
 
const banking::ReconciledBankAccountreconciled () const noexcept
 An accessor to the bank account that is being mapped for reconciliation.
 
const std::optional< pecunia::Money > & remainingExpenses () const noexcept
 An accessor to the remaining expenses to be spent in the current month.
 
const std::map< budgeting::BudgetItemIdentifier, std::set< BalanceChange > > & used () const noexcept
 An accessor to all the budget item transactions that are not reconciled for the bank account.
 

Detailed Description

A representation of a survey account mapping before being completed.

Constructor & Destructor Documentation

◆ MappingSurvey() [1/4]

drn::surveying::MappingSurvey::MappingSurvey ( )
default
Here is the caller graph for this function:

◆ MappingSurvey() [2/4]

drn::surveying::MappingSurvey::MappingSurvey ( banking::ReconciledBankAccount reconciled,
pecunia::Money expectedBalance,
::QDate calculatedFrom,
std::map< budgeting::BudgetItemIdentifier, std::set< BalanceChange > > used,
std::map< budgeting::BudgetItemIdentifier, DistributedAmount > distributable,
std::map< accounting::AccountCode, std::set< BalanceChange > > additional,
std::optional< pecunia::Money > remainingExpenses )

Constructs a survey that fully constructs the object.

Exceptions
BankErrorThrown if the currency of the reconciled bank account does not match the currency of the expected balance.
BankErrorThrown if an optional remaining expense is present and its currency does not match the reconciled bank account currency.
Precondition
The provided calculation date must be valid.
Parameters
reconciledA reconciled bank account that represents the current state of the bank balance.
expectedBalanceThe amount expected to reconcile after incorporating various changes.
calculatedFromThe date from which the expected balance is calculated.
usedA mapping of budget items to their associated balance changes.
distributableA mapping of budget items to amounts that can be further distributed for use in the future.
additionalAdditional changes mapped to specific account codes for consideration.
remainingExpensesWhen provided, is the amount of expenses that are expected in the current month.
Here is the call graph for this function:

◆ MappingSurvey() [3/4]

drn::surveying::MappingSurvey::MappingSurvey ( const MappingSurvey & other)
Here is the call graph for this function:

◆ MappingSurvey() [4/4]

drn::surveying::MappingSurvey::MappingSurvey ( MappingSurvey && other)
noexcept
Here is the call graph for this function:

◆ ~MappingSurvey()

drn::surveying::MappingSurvey::~MappingSurvey ( )
default

Member Function Documentation

◆ additional()

const std::map< accounting::AccountCode, std::set< BalanceChange > > & drn::surveying::MappingSurvey::additional ( ) const
nodiscardnoexcept

An accessor to any additional transactions involving the bank account but not a budget item, e.g. an opening balance, paying budget items using child accounts, etc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculatedFrom()

const ::QDate & drn::surveying::MappingSurvey::calculatedFrom ( ) const
nodiscardnoexcept

An accessor to the date the expected balance of the bank account is calculated from.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distributable()

const std::map< budgeting::BudgetItemIdentifier, DistributedAmount > & drn::surveying::MappingSurvey::distributable ( ) const
nodiscardnoexcept

An accessor to the predicted way the expected balance could be distributable throughout the budget.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ expectedBalance()

const pecunia::Money & drn::surveying::MappingSurvey::expectedBalance ( ) const
nodiscardnoexcept

An accessor to the balance of the bank account calculated from the budget information. N.B. this may, and often is, different that the reconciled balance from a bank statement.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

MappingSurvey & drn::surveying::MappingSurvey::operator= ( const MappingSurvey & other)
Here is the call graph for this function:

◆ operator=() [2/2]

MappingSurvey & drn::surveying::MappingSurvey::operator= ( MappingSurvey && other)
noexcept
Here is the call graph for this function:

◆ reconciled()

const banking::ReconciledBankAccount & drn::surveying::MappingSurvey::reconciled ( ) const
nodiscardnoexcept

An accessor to the bank account that is being mapped for reconciliation.

Here is the caller graph for this function:

◆ remainingExpenses()

const std::optional< pecunia::Money > & drn::surveying::MappingSurvey::remainingExpenses ( ) const
nodiscardnoexcept

An accessor to the remaining expenses to be spent in the current month.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ used()

const std::map< budgeting::BudgetItemIdentifier, std::set< BalanceChange > > & drn::surveying::MappingSurvey::used ( ) const
nodiscardnoexcept

An accessor to all the budget item transactions that are not reconciled for the bank account.

Here is the call graph for this function:
Here is the caller graph for this function: