SourcePro® 2023.1 |
SourcePro® API Reference Guide |
The abstract base class from which all currency implementation classes must derive. More...
#include <rw/currency/exchgimpl.h>
Public Member Functions | |
virtual RWExchangeImpl< T > * | clone () const =0 |
virtual RWMoney< T > | exchange (const RWMoney< T > &money) const =0 |
virtual RWCString | name () const =0 |
void | setSource (const RWCString &src) |
void | setTarget (const RWCString &trg) |
RWCString | source () const |
RWCString | target () const |
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.
|
pure virtual |
Returns a copy of self off the heap.
Implemented in RWTriangularExchange< T >, RWDivisionExchange< T >, and RWMultiplicationExchange< T >.
|
pure 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.
Implemented in RWDivisionExchange< T >, RWTriangularExchange< T >, and RWMultiplicationExchange< T >.
|
pure virtual |
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.
Implemented in RWDivisionExchange< T >, RWTriangularExchange< T >, and RWMultiplicationExchange< T >.
|
inline |
Sets the mnemonic for the source currency.
|
inline |
Sets the mnemonic for the target currency.
|
inline |
Returns the mnemonic for the source currency.
|
inline |
Returns the mnemonic for the target currency.
Copyright © 2023 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |