Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

Public Types | Private Attributes

QuantLib::ExchangeRate Class Reference

exchange rate between two currencies More...

#include <exchangerate.hpp>

Collaboration diagram for QuantLib::ExchangeRate:
Collaboration graph
[legend]

List of all members.

Public Types

enum  Type { Direct, Derived }

Public Member Functions

Constructors
 ExchangeRate ()
 ExchangeRate (const Currency &source, const Currency &target, Decimal rate)
Inspectors
const Currencysource () const
 the source currency.
const Currencytarget () const
 the target currency.
Type type () const
 the type
Decimal rate () const
 the exchange rate (when available)

Private Attributes

Decimal rate_
std::pair< boost::shared_ptr
< ExchangeRate >
, boost::shared_ptr
< ExchangeRate > > 
rateChain_
Currency source_
Currency target_
Type type_

Utility methods

Money exchange (const Money &amount) const
 apply the exchange rate to a cash amount
static ExchangeRate chain (const ExchangeRate &r1, const ExchangeRate &r2)
 chain two exchange rates

Detailed Description

exchange rate between two currencies

Test:
application of direct and derived exchange rate is tested against calculations.

Definition at line 38 of file exchangerate.hpp.


The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index