The manager for interacting with the cached exchange rates file. This is stored under the operating systems' cache directory with the name "exchange-rates.dat". More...
#include <ExchangeRatesFile.h>
Public Member Functions | |
bool | exists () const noexcept override |
Determines if the exchange rates file exists. | |
drn::conversion::ConversionMap | load () const override |
Loads the exchange rates file. | |
void | remove () const override |
Removes the cached exchange rate file. | |
void | store (const drn::conversion::ConversionMap &cm) const override |
Creates or overwrites the exchange rates file. | |
![]() | |
ExchangeRatesStorage ()=default | |
ExchangeRatesStorage (const ExchangeRatesStorage &)=default | |
ExchangeRatesStorage (ExchangeRatesStorage &&)=default | |
virtual | ~ExchangeRatesStorage ()=default |
ExchangeRatesStorage & | operator= (const ExchangeRatesStorage &)=default |
ExchangeRatesStorage & | operator= (ExchangeRatesStorage &&)=default |
The manager for interacting with the cached exchange rates file. This is stored under the operating systems' cache directory with the name "exchange-rates.dat".
|
overridevirtualnoexcept |
Determines if the exchange rates file exists.
Implements drn::storage::ExchangeRatesStorage.
|
overridevirtual |
Loads the exchange rates file.
BinaryFileError | When the exchange rates file is not valid. |
Implements drn::storage::ExchangeRatesStorage.
|
overridevirtual |
Removes the cached exchange rate file.
Implements drn::storage::ExchangeRatesStorage.
|
overridevirtual |
Creates or overwrites the exchange rates file.
BinaryFileError | When the exchange rates file cannot be saved. |
[in] | cm | The exchange rates whose contents are to be stored in the file. |
Implements drn::storage::ExchangeRatesStorage.