25#ifndef quantlib_exchange_rate_hpp
26#define quantlib_exchange_rate_hpp
77 std::pair<ext::shared_ptr<ExchangeRate>,
87 : source_(
std::move(source)),
target_(
std::move(target)), rate_(rate), type_(Direct) {}
exchange rate between two currencies
const Currency & target() const
the target currency.
std::pair< ext::shared_ptr< ExchangeRate >, ext::shared_ptr< ExchangeRate > > rateChain_
Decimal rate() const
the exchange rate (when available)
static ExchangeRate chain(const ExchangeRate &r1, const ExchangeRate &r2)
chain two exchange rates
const Currency & source() const
the source currency.
Money exchange(const Money &amount) const
apply the exchange rate to a cash amount
Type type() const
the type
template class providing a null value for a given type.
Real Decimal
decimal number
cash amount in a given currency