SourcePro® 2023.1 |
SourcePro® API Reference Guide |
Concrete currency exchange implementation class that converts a source currency to a target currency by dividing the amount of the source currency by the associated conversion factor. More...
#include <rw/currency/divexchange.h>
Static Public Attributes | |
static const char * | exchangeMethodName |
RWDivisionExchange derives from the abstract base class RWBilateralExchange. An RWDivisionExchange object converts a source currency to a target currency by dividing the amount of the source currency by the associated conversion factor to obtain the target currency. This contrasts with RWMultiplicationExchange, which multiplies its source currency by the conversion factor to obtain the target amount.
RWDivisionExchange< T >::RWDivisionExchange | ( | ) |
Default constructor. Sets source and target strings to null and the conversion factor to zero.
RWDivisionExchange< T >::RWDivisionExchange | ( | const RWDivisionExchange< T > & | ) |
Copy constructor.
RWDivisionExchange< T >::RWDivisionExchange | ( | const RWCString & | source, |
const RWCString & | target, | ||
double | convFactor | ||
) |
Constructs an exchange object with source currency mnemonic source, target currency mnemonic target, and source to target conversion factor convFactor.
RWDivisionExchange< T >::RWDivisionExchange | ( | const RWExchangeRate & | r | ) |
Constructs an exchange object with source, target, and conversion factor provided in the RWExchangeRate object r.
|
virtual |
Returns a copy of self off the heap.
Implements RWExchangeImpl< T >.
|
virtual |
Virtual function for converting money from the source currency to the target currency. If the currency associated with money does not match the source currency for self, an exception will be thrown.
Implements RWExchangeImpl< T >.
|
inlinevirtual |
Returns the value of the static data member exchangeMethodName.
Implements RWExchangeImpl< T >.
RWDivisionExchange<T>& RWDivisionExchange< T >::operator= | ( | const RWDivisionExchange< T > & | ) |
Assignment operator.
|
static |
This data member is the name returned by the name() function. It contains the name associated with this exchange class.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |