template<class T>
class RWExchange< T >
Currency exchange objects are responsible for converting money of one currency into money of another currency. They encapsulate the source and target currency mnemonics, an exchange algorithm and any required exchange rates.
RWExchangeImpl is an abstract base class from which all currency implementation classes must derive. Class RWExchange is the handle class, which forwards all conversion requests to its associated implementation class.
Currency Module provides three types of currency exchange objects. The first type implements a triangular exchange algorithm required for converting between local currencies through an intermediate currency, such as the EMU requires for the Euro transition. The second type of exchange object multiplies the source currency amount by the exchange factor to obtain a target amount. The third type of exchange object divides the source currency amount by the exchange factor to obtain the target currency amount. All exchange objects share a common API for performing the actual conversion of money.
- Synopsis
#include <rw/currency/currexchange.h>
#include <rw/currency/decimal.h>
#include <rw/currency/divexchange.h>
#include <rw/currency/mp2int.h>
Exactly represents a decimal fraction.
Definition decimal.h:246
A collection of currency objects that convert a source currency to a target currency by dividing the ...
Definition divexchggrp.h:69
Handle class for the abstract body class RWExchangeImpl from which all concrete currency converters d...
Definition currexchange.h:69
const RWExchangeImpl< T > * impl() const
Definition currexchange.h:109