SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Converts a source currency to a target currency by multiplying the amount of the source currency by the associated conversion factor. More...
#include <rw/currency/multexchange.h>
Static Public Attributes | |
static const char * | exchangeMethodName |
RWMultiplicationExchange derives from the abstract base class RWBilateralExchange. An RWMultiplicationExchange object converts a source currency to a target currency by multiplying the amount of the source currency by the associated conversion factor to obtain the target currency amount. This contrasts with RWDivisionExchange, which divides its source currency amount by the conversion factor to obtain the target amount.
RWMultiplicationExchange< T >::RWMultiplicationExchange | ( | ) |
Default constructor. Source and target strings are set to null and the conversion factor is set to zero.
RWMultiplicationExchange< T >::RWMultiplicationExchange | ( | const RWMultiplicationExchange< T > & | ) |
Copy constructor.
RWMultiplicationExchange< T >::RWMultiplicationExchange | ( | 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.
RWMultiplicationExchange< T >::RWMultiplicationExchange | ( | const RWExchangeRate & | rate | ) |
Constructs an exchange object with source, target, and conversion factor provided in the RWExchangeRate object rate.
|
virtual |
Returns a copy of self off the heap.
Implements RWExchangeImpl< T >.
|
virtual |
Pure 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 |
Pure virtual function that returns the name of the implementation class. Rogue Wave implementation classes return their static data member exchangeMethodName
. For example, when an RWExchange object contains an RWTriangularExchange implementation, name() returns RWTriangularExchange::exchangeMethodName.
Implements RWExchangeImpl< T >.
RWMultiplicationExchange< T > & RWMultiplicationExchange< T >::operator= | ( | const RWMultiplicationExchange< 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 © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |