SourcePro C++ 12.0 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Implements a standard form of currency conversion. More...
#include <rw/currency/biexchange.h>
Public Member Functions | |
RWBilateralExchange () | |
RWBilateralExchange (const RWBilateralExchange< T > &) | |
RWBilateralExchange (const RWCString &source, const RWCString &target, double f) | |
RWBilateralExchange (const RWExchangeRate &rate) | |
double | conversionFactor () const |
RWExchangeRate | exchangeRate () const |
void | setConversionFactor (double f) |
void | setExchangeRate (const RWExchangeRate &rate) |
RWBilateralExchange< T > & | operator= (const RWBilateralExchange< T > &) |
RWBilateralExchange<T> is an abstract base class derived from the base class RWExchangeImpl<T> , and is a parent of both the RWMultiplicationExchange<T> and RWDivisionExchange<T> classes. RWBilateralExchange<T> implements the usual method of currency conversion: multiplying or dividing the amount of a source currency by a conversion factor to obtain the equivalent amount in the target currency.
#include <rw/currency/currexchange.h> #include <rw/currency/divexchange.h> #include <rw/currency/multexchange.h>
RWBilateralExchange< T >::RWBilateralExchange | ( | ) |
Default constructor. The source and target mnemonic strings are set to null, and the conversion factor is set to zero.
RWBilateralExchange< T >::RWBilateralExchange | ( | const RWBilateralExchange< T > & | ) |
Copy constructor.
RWBilateralExchange< T >::RWBilateralExchange | ( | const RWCString & | source, | |
const RWCString & | target, | |||
double | f | |||
) |
Constructs a bilateral exchange object with source currency mnemonic given by source, target currency mnemonic given by target, and source to target conversion factor given by f.
RWBilateralExchange< T >::RWBilateralExchange | ( | const RWExchangeRate & | rate | ) |
Constructs a bilateral exchange object with source currency, target currency and conversion factor provided by the RWExchangeRate object rate.
double RWBilateralExchange< T >::conversionFactor | ( | ) | const [inline] |
Returns the conversion factor.
RWExchangeRate RWBilateralExchange< T >::exchangeRate | ( | ) | const |
Returns the source currency, target currency and conversion factor in an RWExchangeRate object.
RWBilateralExchange<T>& RWBilateralExchange< T >::operator= | ( | const RWBilateralExchange< T > & | ) |
Assignment operator.
void RWBilateralExchange< T >::setConversionFactor | ( | double | f | ) | [inline] |
Sets the conversion factor.
void RWBilateralExchange< T >::setExchangeRate | ( | const RWExchangeRate & | rate | ) |
Sets the source currency, target currency and conversion factor to those contained in rate.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.