exchange-rate repository More...
#include <ql/currencies/exchangeratemanager.hpp>
Public Member Functions | |
void | add (const ExchangeRate &, const Date &startDate=Date::minDate(), const Date &endDate=Date::maxDate()) |
Add an exchange rate. More... | |
ExchangeRate | lookup (const Currency &source, const Currency &target, Date date=Date(), ExchangeRate::Type type=ExchangeRate::Derived) const |
void | clear () |
remove the added exchange rates | |
Friends | |
class | Singleton< ExchangeRateManager > |
Additional Inherited Members | |
![]() | |
static ExchangeRateManager & | instance () |
access to the unique instance | |
exchange-rate repository
void add | ( | const ExchangeRate & | , |
const Date & | startDate = Date::minDate() , |
||
const Date & | endDate = Date::maxDate() |
||
) |
Add an exchange rate.
The given rate is valid between the given dates.
ExchangeRate lookup | ( | const Currency & | source, |
const Currency & | target, | ||
Date | date = Date() , |
||
ExchangeRate::Type | type = ExchangeRate::Derived |
||
) | const |
Lookup the exchange rate between two currencies at a given date. If the given type is Direct, only direct exchange rates will be returned if available; if Derived, direct rates are still preferred but derived rates are allowed.