Member Functions | |||
clone() exchange() |
name() setSource() |
setTarget() source() |
target() |
#include <rw/money/exchgimpl.h>
RWExchangeImpl is an abstract base class from which all currency implementation classes must derive. Class RWExchange<T> is the handle class, which forwards all conversion requests to its associated implementation class.
virtual RWExchangeImpl<T>* clone() const = 0;
Returns a copy of self off the heap.
virtual RWMoney<T> exchange(const RWMoney<T>& money) const = 0;
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.
virtual RWCString name() const = 0;
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<T> implementation, name() returns RWTriangularExchange::exchangeMethodName.
void setSource(const RWCString& sourceMnemonic);
Sets the mnemonic for the source currency.
void setTarget(const RWCString& targetMnemonic);
Sets the mnemonic for the target currency.
RWCString source() const;
Returns the mnemonic for the source currency.
RWCString target() const;
Returns the mnemonic for the target currency.
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.