Provides the interface functionality for currency exchange rate retrieval. More...
#include <CurrencySource.hpp>
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. | |
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.
|
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.
parent | A smart pointer to the parent object that the instance will be associated with. |
|
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.
from | The original currency from which the conversion is initiated. |
to | The target currency to which the conversion is calculated. |
Implemented in drn::conversion::OpenExchangeRatesSource.