DuxReiNummariae 1.0.0-alpha.23
Simple and powerful budgeting application
 
Loading...
Searching...
No Matches
drn::conversion::CurrencySource Struct Referenceabstract

Provides the interface functionality for currency exchange rate retrieval. More...

#include <CurrencySource.hpp>

Inheritance diagram for drn::conversion::CurrencySource:
Collaboration diagram for drn::conversion::CurrencySource:

Public Member Functions

 CurrencySource (const foundation::QtPtr< QObject > &parent)
 Full initialisation constructor.
 
virtual pecunia::FloatingPoint fetch (const pecunia::Currency &from, const pecunia::Currency &to) const =0
 When implemented, it retrieves the conversion rate between two currencies.
 

Detailed Description

Provides the interface functionality for currency exchange rate retrieval.

It is designed to facilitate the retrieval of currency conversion rates. It serves as a central mechanism to manage and provide up-to-date foreign exchange rates for calculations, or any system requiring dynamic currency conversion.

Constructor & Destructor Documentation

◆ CurrencySource()

drn::conversion::CurrencySource::CurrencySource ( const foundation::QtPtr< QObject > & parent)
explicit

Full initialisation constructor.

This constructor initializes the instance with a parent object, ensuring that it integrates seamlessly with parent-child relationships in the application.

Parameters
parentA smart pointer to the parent object that the instance will be associated with.

Member Function Documentation

◆ fetch()

virtual pecunia::FloatingPoint drn::conversion::CurrencySource::fetch ( const pecunia::Currency & from,
const pecunia::Currency & to ) const
pure virtual

When implemented, it retrieves the conversion rate between two currencies.

This method is designed to serve as an interface for retrieving conversion rates between two specific currencies.

Parameters
fromThe original currency from which the conversion is initiated.
toThe target currency to which the conversion is calculated.
Returns
The conversion rate between the specified currencies.

Implemented in drn::conversion::OpenExchangeRatesSource.